diff --git a/BauSystem_19/src/de/steamwar/bausystem/utils/PlayerMovementWrapper19.java b/BauSystem_19/src/de/steamwar/bausystem/utils/PlayerMovementWrapper19.java index a3531e5e..afc51ded 100644 --- a/BauSystem_19/src/de/steamwar/bausystem/utils/PlayerMovementWrapper19.java +++ b/BauSystem_19/src/de/steamwar/bausystem/utils/PlayerMovementWrapper19.java @@ -43,7 +43,16 @@ public class PlayerMovementWrapper19 implements PlayerMovementWrapper { @Override public void setPosition(Player player, Object object) { - Position position = playerLocationMap.computeIfAbsent(player.getUniqueId(), uuid -> new Position()); + Position position = playerLocationMap.computeIfAbsent(player.getUniqueId(), uuid -> { + Position pos = new Position(); + Location location = player.getLocation(); + pos.x = location.getX(); + pos.y = location.getY(); + pos.z = location.getZ(); + pos.yaw = location.getYaw(); + pos.pitch = location.getPitch(); + return pos; + }); PacketPlayInFlying packetPlayInFlying = ((PacketPlayInFlying) object); EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle(); if (packetPlayInFlying.h) {