How to implement the GameReloadEvent

Hello!!! So pretty much the Doc’s only touched upon this topic briefely. I’m not wanting to reload the whole plugin. Just the config

How do you load the config in the first place? You should simply repeat what the plugin did on startup.

really? lol that seems so simple :'D lol thanks!

So, reload the config. But don’t reregister commands etc.

1 Like

Ok…so I do what the my main class does to the config upon start up…however the game does not seem to pick up on the changes upon the /Sponge Plugins reload event

Ideas?

here’s the configManager and the MainClass to help

You config is a singleton and thus can’t be reinitialized. Rewrite it to not be a singleton and pass the config manager instances to the command executors that are using it.

I do apologize but do you know of an example that’s not singletons? Cause that’s the only way I know

Just a normal java class. Please learn the basics of Java/programming first.

2 Likes