From 0bcaaf3c0b059bbc4a1ad8234320b46ed83b0d8a Mon Sep 17 00:00:00 2001 From: mindw0rm Date: Thu, 10 Oct 2019 20:11:54 +0200 Subject: [PATCH] copy yaw and pitch when converting between Bukkit Location and PlotSquared Location --- .../plotsquared/bukkit/util/BukkitUtil.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitUtil.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitUtil.java index ebf67e075..06eb60cd7 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitUtil.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitUtil.java @@ -212,12 +212,14 @@ import java.util.Set; public static Location getLocation(@NonNull final org.bukkit.Location location) { return new Location(location.getWorld().getName(), MathMan.roundInt(location.getX()), - MathMan.roundInt(location.getY()), MathMan.roundInt(location.getZ())); + MathMan.roundInt(location.getY()), MathMan.roundInt(location.getZ()), + location.getYaw(), location.getPitch()); } public static org.bukkit.Location getLocation(@NonNull final Location location) { return new org.bukkit.Location(getWorld(location.getWorld()), location.getX(), - location.getY(), location.getZ()); + location.getY(), location.getZ(), + location.getYaw(), location.getPitch()); } public static World getWorld(@NonNull final String string) {