From 3ede8f0daeeacd35225e4a5f09d8559eacb96345 Mon Sep 17 00:00:00 2001 From: DNx5 Date: Tue, 3 Nov 2015 03:56:20 +0700 Subject: [PATCH] let bukkit load the chunk --- src/main/java/fr/xephi/authme/util/Utils.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/fr/xephi/authme/util/Utils.java b/src/main/java/fr/xephi/authme/util/Utils.java index f417824e..7d26c949 100644 --- a/src/main/java/fr/xephi/authme/util/Utils.java +++ b/src/main/java/fr/xephi/authme/util/Utils.java @@ -216,17 +216,15 @@ public class Utils { if (theWorld == null) theWorld = pl.getWorld(); final World world = theWorld; - final Location locat = new Location(world, x, y, z); + final Location loc = new Location(world, x, y, z); Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { @Override public void run() { - AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(pl, locat); + AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(pl, loc); plugin.getServer().getPluginManager().callEvent(tpEvent); if (!tpEvent.isCancelled()) { - if (!tpEvent.getTo().getChunk().isLoaded()) - tpEvent.getTo().getChunk().load(); pl.teleport(tpEvent.getTo()); } }