From 8ad2fde798cc02014b0858daf8da32a82704282a Mon Sep 17 00:00:00 2001 From: vanhec_a Date: Mon, 12 Oct 2015 13:56:12 +0200 Subject: [PATCH] Remove REALLY old loading chunk system before teleport --- .../login/ProcessSyncronousPlayerLogin.java | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/main/java/fr/xephi/authme/process/login/ProcessSyncronousPlayerLogin.java b/src/main/java/fr/xephi/authme/process/login/ProcessSyncronousPlayerLogin.java index 20eacdf2e..00322f68d 100644 --- a/src/main/java/fr/xephi/authme/process/login/ProcessSyncronousPlayerLogin.java +++ b/src/main/java/fr/xephi/authme/process/login/ProcessSyncronousPlayerLogin.java @@ -69,12 +69,8 @@ public class ProcessSyncronousPlayerLogin implements Runnable { protected void teleportBackFromSpawn() { AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, limbo.getLoc()); pm.callEvent(tpEvent); - if (!tpEvent.isCancelled()) { - Location fLoc = tpEvent.getTo(); - if (!fLoc.getChunk().isLoaded()) { - fLoc.getChunk().load(); - } - player.teleport(fLoc); + if (!tpEvent.isCancelled() && tpEvent.getTo() != null) { + player.teleport(tpEvent.getTo()); } } @@ -82,12 +78,8 @@ public class ProcessSyncronousPlayerLogin implements Runnable { Location spawnL = plugin.getSpawnLocation(player); SpawnTeleportEvent tpEvent = new SpawnTeleportEvent(player, player.getLocation(), spawnL, true); pm.callEvent(tpEvent); - if (!tpEvent.isCancelled()) { - Location fLoc = tpEvent.getTo(); - if (!fLoc.getChunk().isLoaded()) { - fLoc.getChunk().load(); - } - player.teleport(fLoc); + if (!tpEvent.isCancelled() && tpEvent.getTo() != null) { + player.teleport(tpEvent.getTo()); } }