Disable Essentials

Discussion in 'Plugin Development' started by champity, Sep 15, 2011.

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


    I'd like to disable Essentials, then enable it.

    It tryed
    PluginManager pm = this.getServer().getPluginManager();
                    Plugin essentials = pm.getPlugin("Essentials");
    But nothing happened.

    Do you know why?
  2. Code:java
    2. PluginManager pm = this.getServer().getPluginManager();
    3. Plugin essentials = pm.getPlugin("Essentials");
    4. if(essentials != null) {
    5. pm.disablePlugin(essentials);
    6. }
  3. Offline


    Hmm ok, but it won't do anything no?
  4. Offline


    Your plugin may be loading before Essentials is loaded. Try setting up a ServerListener and using onEnable to detect it.
  5. disablePlugin is really broken since the beginnings of bukkit. It never worked as it should. Why?
    The only thing that happens is a call to onDisable() of the plugin you disable - and some dirty command removing.
    Events are still passed to the listeners of the plugin, and commands are still registered (though not passed; they simply do nothing, but still block their name).
Thread Status:
Not open for further replies.

Share This Page