Plugin reloading/enabling

I think the only way to do it in a way that is safe at all would be to enforce a policy where plugins specify their dependencies, requiring each dependency to be loaded before each plugin is. When a plugin is (un|re)loaded, all its dependees would be too. In theory it seems simple, but enforcing it might be a pain. That said, there is of course some basic stuff that Sponge could do to minimize boilerplate, like keeping track of the plugin registering each event (no idea if this is the case already yet, haven’t looked at the code quite yet).

1 Like