Disable Specific Commands for Players
OriginalNovember 10, 2024Less than 1 minute
Disable Specific Commands for Players
You Shall Not Pass!
/**
* @param {Internal.CommandEventJS_} event
*/
function youShallNotUsePainter(event) {
const { input, parseResults } = event;
if (input.split(" ")[1] === "painter") {
parseResults.context.source.player.tell("You Shall Not Use Painter!");
event.cancel();
}
}
ServerEvents.command("kubejs", youShallNotUsePainter);
ServerEvents.command("kjs", youShallNotUsePainter);