add isEnabled check before registering additional listeners
This commit is contained in:
@@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
val githubRepo = "jakobkmar/KSpigot"
|
||||
|
||||
group = "net.axay"
|
||||
version = "1.17.3"
|
||||
version = "1.17.4"
|
||||
|
||||
description = "A Kotlin API for the Minecraft Server Software \"Spigot\"."
|
||||
|
||||
|
@@ -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() {
|
||||
|
Reference in New Issue
Block a user