Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Discussion' started by CristianoTRS, Jun 28, 2018.
How do I able and disable a command like: /chat on /chat off
More context. This question is way too vage to answer.
We need a meme about needing more context.
Its "Enable" not "Able"
You can use a command executor with args, on and off being the args, you can then use a boolean to determine whether or not the command or subject of command is enabled or disabled.
If you want to do it through code you can follow the earlier advice. There are also multiple plugins that will cancel command sending if that is what you are looking for?
This bump wasn't required.
Then why did you bump?
What do you mean exactly? Are you looking to disable any command or just a specific command? You could revoke the permissions to use the command.
get a plugin which blocks commands
There is a lot of plugins that can block commands. Check out my plugin if you want (Protector)
listener the PlayerCommandPreprocessEvent , and setCancel
There is Spigot Discussions not Spigot Plugin Development