From d3b2dac30e83e731b42c2e4ea4b3df3185054d90 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Sat, 9 Jan 2016 18:32:58 +0100 Subject: [PATCH] Fix the bug I just added --- .../massivecore/engine/EngineMassiveCorePlayerState.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/massivecraft/massivecore/engine/EngineMassiveCorePlayerState.java b/src/com/massivecraft/massivecore/engine/EngineMassiveCorePlayerState.java index f2207e4e..41d88f5e 100644 --- a/src/com/massivecraft/massivecore/engine/EngineMassiveCorePlayerState.java +++ b/src/com/massivecraft/massivecore/engine/EngineMassiveCorePlayerState.java @@ -84,7 +84,8 @@ public class EngineMassiveCorePlayerState extends EngineAbstract @EventHandler(priority = EventPriority.MONITOR) public void logasyncMonitor(AsyncPlayerPreLoginEvent event) { - if (event.getLoginResult() != AsyncPlayerPreLoginEvent.Result.ALLOWED) return; + // If the player was denied entrance they are now offline. + if (event.getLoginResult() == AsyncPlayerPreLoginEvent.Result.ALLOWED) return; final UUID id = event.getUniqueId(); @@ -108,7 +109,8 @@ public class EngineMassiveCorePlayerState extends EngineAbstract @EventHandler(priority = EventPriority.MONITOR) public void logsyncMonitor(PlayerLoginEvent event) { - if (event.getResult() != PlayerLoginEvent.Result.ALLOWED) return; + // If the player was denied entrance they are now offline. + if (event.getResult() == PlayerLoginEvent.Result.ALLOWED) return; final Player player = event.getPlayer(); if (MUtil.isntPlayer(player)) return;