Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
unfinished
Browse files Browse the repository at this point in the history
  • Loading branch information
VoxlDevv committed Jul 18, 2023
1 parent abc70ca commit 148c4e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/main/plugins/Chat Ranks/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { BeforeEvents, PlayerClass } from "../@modules";
import { RankConfig } from "./config";
BeforeEvents.on("chat", (rawdata) => {
const { sender, message } = rawdata;
rawdata.cancel = true;
const player = new PlayerClass(sender);
const getRank = player.getTagStartsWith("rank:")?.slice(5) ?? RankConfig.defaultRank;
world.sendMessage(getRank?.replaceAll("@NAME", sender.name)?.replaceAll("@CHAT", message));
Expand Down
1 change: 1 addition & 0 deletions src/main/plugins/Chat Ranks/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { RankConfig } from "./config";

BeforeEvents.on("chat", (rawdata) => {
const { sender, message } = rawdata;
rawdata.cancel = true;
const player = new PlayerClass(sender);
const getRank =
player.getTagStartsWith("rank:")?.slice(5) ?? RankConfig.defaultRank;
Expand Down

0 comments on commit 148c4e5

Please sign in to comment.