Skip to content

Commit dbd8d1c

Browse files
fix: UninitializedPropertyAccessException on plugin shutdown
1 parent 8fa86f8 commit dbd8d1c

File tree

2 files changed

+8
-1
lines changed
  • proxy-bungeecord/src/main/kotlin/app/simplecloud/plugin/proxy/bungeecord/handler
  • proxy-velocity/src/main/kotlin/app/simplecloud/plugin/proxy/velocity/handler

2 files changed

+8
-1
lines changed

proxy-bungeecord/src/main/kotlin/app/simplecloud/plugin/proxy/bungeecord/handler/TabListHandler.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ class TabListHandler(
2828
}
2929

3030
fun stopTabListTask() {
31-
if (!this::task.isInitialized)
31+
if (!this::task.isInitialized) {
32+
println("Can't stop tablist task because it is not initialized")
3233
return
34+
}
3335

3436
this.task.cancel()
3537
}

proxy-velocity/src/main/kotlin/app/simplecloud/plugin/proxy/velocity/handler/TabListHandler.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ class TabListHandler(
2626
}
2727

2828
fun stopTabListTask() {
29+
if (!this::task.isInitialized) {
30+
println("Can't stop tablist task because it is not initialized")
31+
return
32+
}
33+
2934
this.task.cancel()
3035
}
3136

0 commit comments

Comments
 (0)