Closed phase closed 9 years ago
Well I think you should use an event based system. Because you could then easily make the other events later with out having to write a whole new system to handle them.
@chibill I've already started on the Event system, but I don't know whether or not to use it for enabling/disabling.
Well it would be sort of like how forge uses it event system to preinit,init and poatinit mods. (Their is an function with a parm of the event class..)
We're going to use an Event system for server starting & closing:
ServerBootEvent
: Fired right when the server is opened.
ServerLoadEvent
: Fired when the server starts to load.
ServerStopEvent
: Fired when the server stops.
And also ServerLoadEvent seems point-less. Unless you mean like when it starts to load in all the world data...
Maybe a PluginLoadedEvent to tell other plugins a Plugin was loaded. And it would be sent to all but the freshly loaded plugin.
@chibill I mean twhen the world and stuff was loaded. PluginLoadedEvent could work too.
Yeah that makes sense now. But the loading of the world would it not be a WorldLoadedEvent? And also a ChunkLoaderEvent when chunks are actually loaded. Maybe the ServerLoadEvent would mean when it loads all the saypve data like the ban list and that?
It'd be great to have multiple events for it, such as the Chunk & World loading.
See slack I made a google doc spread sheet for us to list event ideas. Also don't put its url up as it is anyone with link can edit.
Do we want to have the enabling be an Event or a method? I personally like the event.