add isEnabled check before registering additional listeners

This commit is contained in:
Skyslycer
2021-09-16 21:02:21 +02:00
parent 618c8285a8
commit db3dc0d0f6
2 changed files with 5 additions and 2 deletions

View File

@@ -66,7 +66,10 @@ abstract class KSpigot : JavaPlugin() {
final override fun onEnable() {
startup()
BrigardierSupport.registerAll()
// Only register the listeners, when the plugin is still enabled and didn't get disabled in the shutdown method
if (this.isEnabled) {
BrigardierSupport.registerAll()
}
}
final override fun onDisable() {