Getting started
Most of the features below (commands, listeners, item builder, tasks, boss bars, action bar, coroutines, sidebars, serialization) set themselves up automatically, but only if your main class extends SporePlugin instead of JavaPlugin.
SporePlugin owns onLoad, onEnable and onDisable itself - that's where all the setup happens - so you override onPluginLoad, onPluginEnable and onPluginDisable instead. There's no super call to remember.
class TestingPlugin : SporePlugin() {
override fun onPluginEnable() {
Logger.initialize("Your plugin name")
}
override fun onPluginDisable() {
// your own cleanup, the API cleans up after itself
}
}
If you only want the simple stuff like Message and Logger, extending JavaPlugin still works fine.