-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust the limit of config, configdb command
- Loading branch information
jasonlaubb
committed
Sep 6, 2024
1 parent
1668ea6
commit 344ef5b
Showing
3 changed files
with
18 additions
and
12 deletions.
There are no files selected for viewing
22 changes: 14 additions & 8 deletions
22
ac_BP/src/Functions/chatModel/Commands/moderations/setadmin.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
import { registerCommand, isPlayer, verifier } from "../../CommandHandler"; | ||
import { c, getPLevel, rawstr } from "../../../../Assets/Util"; | ||
|
||
registerCommand({ | ||
name: "setadmin", | ||
description: "Set the admin permission level of a player", | ||
description: "Let a player disconnect directly", | ||
parent: false, | ||
maxArgs: 2, | ||
minArgs: 2, | ||
argRequire: [verifier.isNumber, verifier.isNumber], | ||
executor: (player: Minecraft.Player, args: string[]) => { | ||
const config = c(); | ||
config[args[0]] = args[1]; | ||
config.save(); | ||
} | ||
}) | ||
argRequire: [(value) => !!isPlayer(value as string)], | ||
require: (player) => verifier(player, c().commands.tempkick), | ||
executor: async (player, args) => { | ||
const target = isPlayer(args[0]); | ||
const targetNumber = Number(args[1]); | ||
if (getPLevel(target) >= getPLevel(player)) { | ||
player.sendMessage(new rawstr(true, "c").tra("setadmin.toohigh").parse()); | ||
} else if () | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters