
net.chestmc.common.service.AbstractServiceRegistry.kt Maven / Gradle / Ivy
package net.chestmc.common.service
/**
* A abstract implementation of [ServiceRegistry]. This can supports
* loading configurations, commands and events.
* The load-order to extra supported functions is:
* 1. configurations
* 2. commands.
* 3. events.
*/
abstract class AbstractServiceRegistry : ServiceRegistry {
override fun startup() {
configurations()
commands()
events()
}
override fun shutdown() = Unit
/**
* Loads all configurations of this service registry.
*/
open fun configurations() = Unit
/**
* Loads all commands of this service registry.
*/
open fun commands() = Unit
/**
* Loads all events of this service registry.
*/
open fun events() = Unit
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy