diff --git a/src/main/java/fr/xephi/authme/listener/PlayerListener.java b/src/main/java/fr/xephi/authme/listener/PlayerListener.java index 5deaf40c..bc776333 100644 --- a/src/main/java/fr/xephi/authme/listener/PlayerListener.java +++ b/src/main/java/fr/xephi/authme/listener/PlayerListener.java @@ -79,7 +79,7 @@ public class PlayerListener implements Listener { @Inject private JoinMessageService joinMessageService; - private static boolean IS_ASYNC_PLAYER_PRE_LOGIN_EVENT_CALLED = false; + private static boolean isAsyncPlayerPreLoginEventCalled = false; @EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST) public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) { @@ -193,7 +193,7 @@ public class PlayerListener implements Listener { public void onPlayerJoin(PlayerJoinEvent event) { final Player player = event.getPlayer(); - if (!PlayerListener19Spigot.isIsPlayerSpawnLocationEventCalled()) { + if (!PlayerListener19Spigot.isPlayerSpawnLocationEventCalled()) { teleportationService.teleportOnJoin(player); management.performJoin(player, player.getLocation()); } @@ -224,7 +224,7 @@ public class PlayerListener implements Listener { @EventHandler(priority = EventPriority.HIGHEST) public void onAsyncPlayerPreLoginEvent(AsyncPlayerPreLoginEvent event) { - IS_ASYNC_PLAYER_PRE_LOGIN_EVENT_CALLED = true; + isAsyncPlayerPreLoginEventCalled = true; final String name = event.getName(); @@ -259,7 +259,7 @@ public class PlayerListener implements Listener { return; } - if (!IS_ASYNC_PLAYER_PRE_LOGIN_EVENT_CALLED) { + if (!isAsyncPlayerPreLoginEventCalled) { try { runOnJoinChecks(name, event.getAddress().getHostAddress()); } catch (FailedVerificationException e) { diff --git a/src/main/java/fr/xephi/authme/listener/PlayerListener19Spigot.java b/src/main/java/fr/xephi/authme/listener/PlayerListener19Spigot.java index 9877dbde..521b2fb2 100644 --- a/src/main/java/fr/xephi/authme/listener/PlayerListener19Spigot.java +++ b/src/main/java/fr/xephi/authme/listener/PlayerListener19Spigot.java @@ -19,16 +19,16 @@ public class PlayerListener19Spigot implements Listener { @Inject private TeleportationService teleportationService; - private static boolean IS_PLAYER_SPAWN_LOCATION_EVENT_CALLED = false; + private static boolean isPlayerSpawnLocationEventCalled = false; - public static boolean isIsPlayerSpawnLocationEventCalled() { - return IS_PLAYER_SPAWN_LOCATION_EVENT_CALLED; + public static boolean isPlayerSpawnLocationEventCalled() { + return isPlayerSpawnLocationEventCalled; } // Note: the following event is called since MC1.9, in older versions we have to fallback on the PlayerJoinEvent @EventHandler(priority = EventPriority.HIGH) public void onPlayerSpawn(PlayerSpawnLocationEvent event) { - IS_PLAYER_SPAWN_LOCATION_EVENT_CALLED = true; + isPlayerSpawnLocationEventCalled = true; final Player player = event.getPlayer(); management.performJoin(player, event.getSpawnLocation());