From 72269e08e61207c1469d574a94eaf56d4a42bcb2 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 24 Jul 2020 20:29:08 +0100 Subject: [PATCH] Force sync teleports with trySetPosition Fixes #542 --- .../src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java index 54289bd99..64dbce76b 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java @@ -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