Reloading jar plugin

Discussion in 'BungeeCord Plugin Development' started by Aurelian6, May 20, 2015.

  1. Hello,

    I am trying to develop BungeeCord plugins.
    Only problem is that I can not reload the plugin (the .jar file)

    Do you have any solutions to be able to reload a plugin without restarting bungeecord?
    I searched the internet but I have not found.

    Good day.
     
  2. you can use /greload
     
  3. This command doesn't reload plugins.
     
  4. It reloads mine though
     
  5. But i wish reload one plugin!
     
  6. You knew its about bungee here? PlugMan looks strongly it does not support bungeecord.
     
  7. PlugMan is for Bukkit servers, not BungeeCord instances. It does not work as a BungeeCord plugin.

    As for the original question, Bungee does not support plugin unloading. It's actually a terrible idea to have 'plugin' unloading in any Java app, because anything the plugin does to retain even a single reference after the plugin unloads (very easy to do this by accident) could cause a whole plethora of references to stay in scope, causing a big memory leak.

    Also, classes, similar to objects, are only unloaded in Java when all references to the class instance are eliminated. This is really difficult to ensure, especially when you factor in dependencies and plugin hooks.

    The same goes for Bungee. This is why Bungee doesn't have anything for plugin unloading - because it's a ridiculous idea.

    Just reboot your Bungee instance.