Plugin manager for Airbrush, separated into an open source library.
First, add the Jitpack repository:
repositories {
maven(url = "https://jitpack.io/")
}
Then, add the dependency.
dependencies {
implementation("com.github.airbrushgg:plugins:VERSION")
}
When you start your server, just register & setup the plugins.
Teardown the plugins when the server stops.
val pluginManager = PluginManager()
pluginManager.registerPlugins()
pluginManager.setupPlugins()
Runtime.getRuntime().addShutdownHook(Thread {
pluginManager.teardownPlugins()
})
All done.