Disabling plugins.

Discussion in 'Plugin Development' started by MuisYa, Sep 29, 2011.

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

    MuisYa

    Sooo, my code is the following:
    Code:
    PluginManager pm = getServer().getPluginManager();
    Plugin thePlugin = (arg1);
    // now disable a plugin.
    pm.disablePlugin(thePlugin);
    
    This code should disable the plugin, right?
    The console tells me that the plugin is disabled. And no commands of the specified plugin are working...
    But: I still cant delete that plugin out of the plugin folder, because its still ''Opened by JAVA''.

    Is there a way?
     
  2. Offline

    ZNickq

    It still registers the events,even if you disable it! What you need it to "unload" it,not sure if there's such a method in bukkit!
     
  3. Offline

    hatstand

    ^ This, basically. Why you need to unload a plugin is beyond me, you shouldn't be interfering with other plugins.
     
  4. Offline

    MuisYa

    @ZNickq Hmmm, "Well that sucks."

    No i dont think either, i want to make a plugin which can disable plugins on my server.
    This will make it very easy to update them.
    Just disable it, you can delete it and paste the new version in. Than you dont need to restart the whole server...

    Someone got any idea about the method?
     
  5. Offline

    hatstand

    My plugin updates work like this: Delete file > Download new one > /reload (Running on Linux, so that works. Windows, not so much)

    Have you looked at any of the plugin managers around? No idea what kind of features they have beyond enabling/disabling.
     
  6. Offline

    MuisYa

    Windows cant delete when its enabled... Pretty fucked...
    So i cant make this plugin :<
     
  7. Offline

    Kaikz

    Look at PluginReloader's source code. There's a lot more to it afaik.
     
  8. Offline

    stelar7

    if you export it to the plugins forlder from eclipse you just do /reload in the console and it works :D
     
  9. Offline

    Celeixen

    Btw your still allowed to overwrite plugins that are in use, then just /reload.
     
  10. Pretty sure its not possible to "unload" a plugin >.>...Its the way ClassLoaders work
     
Thread Status:
Not open for further replies.

Share This Page