mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 11:55:38 +01:00
copy yaw and pitch when converting between Bukkit Location and PlotSquared Location
This commit is contained in:
parent
5315e1e337
commit
0bcaaf3c0b
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user