In normal forge you would need to register the class onto the EVENT_BUS. I don’t know what the plan is for sponge, but I would assume something similar.
One difference with bukkit though is that you don’t need to implement anything. You can just use any class you have and add a SubscribeEvent without needing to implement a special interface.
It looks like you will need to register the class. However it seems like you need to get the current game object, yet there is no way to get it except in an event. (I’m thinking events in the main class may be automatically registered?) Here’s what you seem to need to do right now: when the server is starting you grab that event, and then do this to register it:
Oh ok, I understand you now! We will be getting a wiki in place for all of these things and hopefully having far better documentation that past projects.
Keep in mind the @Plugin … in front of a class can’t be changed at runtime. Its not like you can control them in your code (however just like Bukkit, you will most likely be able to change settings at runtime)
It’s in discussion, but according to the talk, yes, it will have easy file creation/editing methods (at least for the config files). However we’ll just have to wait and see.
Seems like there is only an init event for the plugin when the server is started. Will there be an independent plugin enable event (as it was in bukkit)? I liked the ability in bukkit to load and unload plugins selectively using plugman although that didn’t work for all plugins. Thanks.
All you’re really doing is getting and setting plugin paths and putting values in there, doesn’t seem to hard but…I guess you were a bukkit documenter correct? I’ll take your word for it…
That’s kind of sad
Especially when the documentation for configuration actually kicked ass. I think my only problem with the documentation was serializing objects, other than that it nailed it and made perfectly clear how to use it.