Making my plugin reload proof
Nubebuster opened this issue ยท 3 comments
Hey, I have been using plugman for years now and I have never really had issues, untill I made an anticheat plugin.
The problem is that if I update the plugin jar and use the /plugman reload command, certain listeners aren't being registered correctly. I can't figure out why, could you maybe give some tips on how I can make my plugin plugman reload proof?
PS Normal server reloads dont give the same problem
[Edit] Some additional info;
in my onenable I only register new listener, and commands. Nothing special there.
I do infact register the protocollib protocolmanager in the onLoad(). Could this be the cause? I moved it to the onEnable(), this did not fix the issue.
No errors are throws when reloading the plugin
Are you able to provide some code so I can get a better idea what you're working with?
Generally, as long as you clean-up everything in your onDisable() method, you should be good. Keep in mind that unloading is kind of hacked together as Bukkit doesn't support native unloading, so it's prone to not functioning 100% properly.
Just for kicks, give Build #71 a try - I added some code (that probably should have been there all along) that attempts to disable the plugin properly before unloading.