Solved Unregister Commands

Discussion in 'Spigot Plugin Development' started by Ehrenmann, Feb 10, 2020.

  1. Hey, i am currently working on a selfmade version of Essentials. So far everything works great but one important thing is missing. As you propably know in the default essentials config you are able to remove commands from the main Essentials Plugin (Override) so other Plugins are able to handle the commands for instance fly. Since my command are registerd in the default way (in plugin.yml and
    Bukkit.getPluginCommand) i wondered if there is a easy way to unregister commands.
     
  2. If you want to enable/disable commands, you need to do it programmatically instead of through the plugin.yml. Then just check the config to see if it is enabled, if it is enabled register the command. Otherwise, do nothing.
     
    • Winner Winner x 1