Remove old loading chunk system

This commit is contained in:
vanhec_a 2015-11-01 13:34:21 +01:00
parent 9629ad1594
commit 7824131cec

View File

@ -85,10 +85,7 @@ public class ProcessSyncronousPasswordRegister implements Runnable {
Location loca = plugin.getSpawnLocation(player);
RegisterTeleportEvent tpEvent = new RegisterTeleportEvent(player, loca);
plugin.getServer().getPluginManager().callEvent(tpEvent);
if (!tpEvent.isCancelled()) {
if (!tpEvent.getTo().getWorld().getChunkAt(tpEvent.getTo()).isLoaded()) {
tpEvent.getTo().getWorld().getChunkAt(tpEvent.getTo()).load();
}
if (!tpEvent.isCancelled() && tpEvent.getTo() != null) {
player.teleport(tpEvent.getTo());
}
}