diff --git a/src/com/massivecraft/massivecore/engine/EngineMassiveCorePlayerState.java b/src/com/massivecraft/massivecore/engine/EngineMassiveCorePlayerState.java index b9b45e51..f2207e4e 100644 --- a/src/com/massivecraft/massivecore/engine/EngineMassiveCorePlayerState.java +++ b/src/com/massivecraft/massivecore/engine/EngineMassiveCorePlayerState.java @@ -81,6 +81,16 @@ public class EngineMassiveCorePlayerState extends EngineAbstract this.idToState.put(id, PlayerState.LOGASYNC); } + @EventHandler(priority = EventPriority.MONITOR) + public void logasyncMonitor(AsyncPlayerPreLoginEvent event) + { + if (event.getLoginResult() != AsyncPlayerPreLoginEvent.Result.ALLOWED) return; + + final UUID id = event.getUniqueId(); + + this.idToState.remove(id); + } + // -------------------------------------------- // // LOGSYNC // -------------------------------------------- // @@ -95,6 +105,18 @@ public class EngineMassiveCorePlayerState extends EngineAbstract this.idToState.put(id, PlayerState.LOGSYNC); } + @EventHandler(priority = EventPriority.MONITOR) + public void logsyncMonitor(PlayerLoginEvent event) + { + if (event.getResult() != PlayerLoginEvent.Result.ALLOWED) return; + + final Player player = event.getPlayer(); + if (MUtil.isntPlayer(player)) return; + final UUID id = player.getUniqueId(); + + this.idToState.remove(id); + } + // -------------------------------------------- // // JOINING // -------------------------------------------- //