Reloading the .jar file

Discussion in 'Plugin Development' started by Jugglernaught, Feb 8, 2014.

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

    Jugglernaught

    As you know, small tweaks can be very annoying some times when doing coding. So, if I wanted to create a command that reloads the entire .jar file, but not all of the plugins, how can I do that. I already tried
    Code:java
    1. this.getServer().getPluginManager().disable(this);
    2. this.getServer().getPluginManager().enable(this);

    (Sorry if I got a bit wrong, but you get the gist)

    and it doesn't reload the .jar file really. Anyone know?

    Thanks
     
  2. Offline

    Jake6177

    Can't do it. Reload the server. Causes memory leaks, but if you can't afford closing and re-opening, this is the way to go.
     
  3. Offline

    Icyene

    I'm unsure of how Bukkit's PluginClassLoader operates, but seeing as it inherits from URLClassLoader it should be feasible to "close" the URLClassLoader as long as the ClassLoaders are on a per-plugin basis.

    Honestly, however, you'd be better off configuring your IDE to hotswap your plugin classes so you don't have to restart your server.
     
Thread Status:
Not open for further replies.

Share This Page