Question...

Discussion in 'Spigot Discussion' started by CristianoTRS, Jun 28, 2018.

  1. How do I able and disable a command like: /chat on /chat off
     
  2. More context. This question is way too vage to answer.

    We need a meme about needing more context.
     
  3. 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.
     
  4. 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?
     
  5. This bump wasn't required.
     
  6. 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.
     
  7. get a plugin which blocks commands
     
  8. There is a lot of plugins that can block commands. Check out my plugin if you want (Protector) :)
     
  9. listener the PlayerCommandPreprocessEvent , and setCancel
     
  10. There is Spigot Discussions not Spigot Plugin Development