mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
copy yaw and pitch when converting between Bukkit Location and PlotSquared Location
This commit is contained in:
parent
5315e1e337
commit
0bcaaf3c0b
1 changed files with 4 additions and 2 deletions
|
@ -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 a new issue