From a94b0105715fc5bbfb36cf1c466bb222c56f178a Mon Sep 17 00:00:00 2001 From: Adrian Freund Date: Sat, 13 Apr 2019 12:37:28 +0200 Subject: [PATCH] Fixed banned players blocking the server by trying to join --- .../minecraft/oneslotserver/handler/event/PlayerListener.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/freundtech/minecraft/oneslotserver/handler/event/PlayerListener.kt b/src/main/kotlin/com/freundtech/minecraft/oneslotserver/handler/event/PlayerListener.kt index c4bfa9e..6b8ddcf 100644 --- a/src/main/kotlin/com/freundtech/minecraft/oneslotserver/handler/event/PlayerListener.kt +++ b/src/main/kotlin/com/freundtech/minecraft/oneslotserver/handler/event/PlayerListener.kt @@ -32,9 +32,11 @@ class PlayerListener(private val plugin: OneSlotServer) : Listener { event.disallow(Result.KICK_FULL, "A person is already playing. Please wait ${waitLeft.format()}.") } - } else { + } + if (event.result == Result.ALLOWED) { plugin.activePlayer = event.player event.player.loadFromSharedData() + } }