Registering a command after plugin has loaded

Discussion in 'Plugin Development' started by libraryaddict, Apr 27, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    libraryaddict

    Plugin 1 registers the command '/msg'

    Plugin 2 loads and reads its config. In the config it says to take the command '/msg'
    So it takes it.

    The problem is, As far as I'm aware. To take the command it must be in plugin.yml. And the command is taken by default if it is in there. Meaning plugin 1 no longer has control even though plugin 2 isn't doing anything.

    Example is.
    Plugin 1 uses /msg for its own message system.

    But plugin 2 offers its own message system. Which does different things. But its not 'enabled' by default.
     
  2. Offline

    libraryaddict

  3. Offline

    UltimateBudgie

    I'm pretty sure you can use the PlayerCommandPreProcessEvent to check for a command without it being in the plugin.yml
    (Although it's discouraged)
     
  4. Offline

    Iaccidentally

    It is also possible for plugins to not use the Bukkit onCommand() method, and then register commands dynamically. Just because something is in the plugin.yml does not mean it is registered.
     
Thread Status:
Not open for further replies.

Share This Page