copy yaw and pitch when converting between Bukkit Location and PlotSquared Location

This commit is contained in:
mindw0rm 2019-10-10 20:11:54 +02:00
parent 5315e1e337
commit 0bcaaf3c0b

View file

@ -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) {