Skip to content

Commit

Permalink
Update CommandHandler.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonlaubb authored Sep 19, 2024
1 parent ff75742 commit a820582
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ac_BP/src/Functions/chatModel/CommandHandler.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as Minecraft from "@minecraft/server";
import { c, getPLevel, isAdmin, rawstr } from "../../Assets/Util";
import { system } from "@minecraft/server";
import { MatrixUsedTags } from "../../Data/EnumData";

export function verifier(player: Minecraft.Player, setting: CommandConfig) {
if (setting.enabled !== true) {
Expand All @@ -13,7 +14,7 @@ export function verifier(player: Minecraft.Player, setting: CommandConfig) {
}
} else if (setting.requireTag.length > 0 && !player.getTags().some((tag) => setting.requireTag.includes(tag))) {
return false;
} else if (setting.requireOp === true && !player.isOp()) {
} else if (setting.requireOp === true && !player.hasTag(MatrixUsedTags.op)) {
return false;
}
return true;
Expand Down

0 comments on commit a820582

Please sign in to comment.