mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Add yaw and pitch to CommandSourceStack#getBukkitLocation() (#8167)
This commit is contained in:
parent
e484f0dd39
commit
220055020e
1 changed files with 2 additions and 1 deletions
|
@ -53,7 +53,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ public org.bukkit.Location getBukkitLocation() {
|
+ public org.bukkit.Location getBukkitLocation() {
|
||||||
+ Vec3 pos = getPosition();
|
+ Vec3 pos = getPosition();
|
||||||
+ org.bukkit.World world = getBukkitWorld();
|
+ org.bukkit.World world = getBukkitWorld();
|
||||||
+ return world != null && pos != null ? new org.bukkit.Location(world, pos.x, pos.y, pos.z) : null;
|
+ Vec2 rot = getRotation();
|
||||||
|
+ return world != null && pos != null ? new org.bukkit.Location(world, pos.x, pos.y, pos.z, rot != null ? rot.x : 0, rot != null ? rot.y : 0) : null;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
|
|
Loading…
Reference in a new issue