Force sync teleports with trySetPosition

Fixes #542
This commit is contained in:
dordsor21 2020-07-24 20:29:08 +01:00
parent d3ff4131a3
commit 72269e08e6
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B

View File

@ -203,7 +203,8 @@ public class BukkitPlayer extends AbstractPlayerActor {
world = Bukkit.getWorld(((World) extent).getName());
}
}
return player.teleport(new Location(world, pos.getX(), pos.getY(), pos.getZ(), yaw, pitch));
org.bukkit.World finalWorld = world;
return TaskManager.IMP.sync(() -> player.teleport(new Location(finalWorld, pos.getX(), pos.getY(), pos.getZ(), yaw, pitch)));
}
@Override