mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-30 17:59:53 +02:00
Always teleport in sync thread
This commit is contained in:
@@ -233,11 +233,19 @@ public class Teleport implements Runnable, ITeleport
|
|||||||
teleTimer = ess.getPlugin().scheduleSyncRepeatingTask(this, 10, 10);
|
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();
|
cancel();
|
||||||
user.setLastLocation();
|
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
|
@Override
|
||||||
|
Reference in New Issue
Block a user