1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-29 17:29:56 +02:00

Always teleport in sync thread

This commit is contained in:
snowleo
2012-10-16 22:21:48 +02:00
parent ef289cb309
commit 3dd98f1048

View File

@@ -233,11 +233,19 @@ public class Teleport implements Runnable, ITeleport
teleTimer = ess.getPlugin().scheduleSyncRepeatingTask(this, 10, 10);
}
private void now(Target target, TeleportCause cause) throws Exception
private void now(final Target target, final TeleportCause cause) throws Exception
{
cancel();
user.setLastLocation();
user.getPlayer().teleport(LocationUtil.getSafeDestination(target.getLocation()), cause);
final Location loc = LocationUtil.getSafeDestination(target.getLocation());
ess.getPlugin().scheduleSyncDelayedTask(new Runnable()
{
@Override
public void run()
{
user.getPlayer().teleport(loc, cause);
}
});
}
@Override