so im having trouble making a command blocker not one of those minecraft : pl blockers but actual commands i would need to disable if someone found a dupe with one of them
Code:
command /commandblocker [<text>] [<text>]:
aliases: cb
trigger:
player has permission "MarsCore.commandblocker":
if arg-1 is set:
if arg-1 is "list":
if {commands::*} is not set:
send "&c&lCB ➡ &6No commands have been blocked" to player
stop
else:
send "&c&lCB ➡ &6%{commands::*}%" to player
stop
if arg-1 is "add":
if arg-2 is set:
if arg-2 contains {commands::*}:
send "&c&lCB ➡ &6This command has already been blocked" to player
stop
else:
add arg 2 to {commands::*}
send "&c&lCB ➡ &6Added /%arg-2% to the blocked commands" to player
stop
else:
send "&cUsage: /cb <add/remove/list> <command>" to player
stop
if arg-1 is "remove":
if arg-2 is set:
remove arg 2 from {commands::*}
send "&c&lCB ➡ &6Removed /%arg-2% from the blocked commands" to player
stop
else:
send "&cUsage: /cb <add/remove/list> <command>" to player
stop
if arg-1 is "purge":
delete {commands::*}
send "&aDone" to player
else:
send "&cUsage: /cb <add/remove/list> <command>" to player
stop
on command:
if command contains {commands::*}:
cancel event
send "&cThat command is disabled"