Add /reloadutils #18

Closed
opened 2015-03-19 18:06:52 -04:00 by Dico200 · 1 comment
Dico200 commented 2015-03-19 18:06:52 -04:00 (Migrated from github.com)

I've tried to make this work but I'm stuck.
It would be really nice to have cuz as it is now whenever we implement changes we have to reboot the server. I also have to keep restarting my test server (reloading twice causes some PermGenError and OutOfMemoryError).

So if someone knows how to reload our python plugins, I'm all ears!

I tried:

pm = server.getPluginManager()
utilsplugin = pm.getPlugin("RedstonerUtils")
pm.disablePlugin(utilsplugin)
Event.getHandlerList().unregisterAll(pm.getPlugin("PythonLoader"))
pm.enablePlugin(utilsplugin)

You can't disable the python plugin because it will be unable to interprete the next lines. I tried that too. Event doesn't have getHandlerList() (it's static). If you don't unregister all events/commands (They seem to be registered to PythonLoader) it will throw a bunch of errors because all of them are already loaded when utils tries to register them.

I've tried to make this work but I'm stuck. It would be really nice to have cuz as it is now whenever we implement changes we have to reboot the server. I also have to keep restarting my test server (reloading twice causes some PermGenError and OutOfMemoryError). So if someone knows how to reload our python plugins, I'm all ears! I tried: ``` Python pm = server.getPluginManager() utilsplugin = pm.getPlugin("RedstonerUtils") pm.disablePlugin(utilsplugin) Event.getHandlerList().unregisterAll(pm.getPlugin("PythonLoader")) pm.enablePlugin(utilsplugin) ``` You can't disable the python plugin because it will be unable to interprete the next lines. I tried that too. Event doesn't have getHandlerList() (it's static). If you don't unregister all events/commands (They seem to be registered to PythonLoader) it will throw a bunch of errors because all of them are already loaded when utils tries to register them.
jomo commented 2015-03-19 18:20:14 -04:00 (Migrated from github.com)

This would be part of @gdude2002/Python-Plugin-Loader – not our plugin.

This would be part of [@gdude2002/Python-Plugin-Loader](https://github.com/gdude2002/Python-Plugin-Loader) – not our plugin.
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Redstoner/redstoner-utils#18