Fixed yaw calculation for teleportation.
This commit is contained in:
parent
0f6f05b045
commit
56d0b8bf1c
@ -42,9 +42,10 @@ public class PluginPlayerListener extends BaseLocationListener implements Listen
|
||||
checkChunkLoad(gateAtLocation.getLocation().getBlock());
|
||||
|
||||
Location gateExit = gateAtLocation.getExit();
|
||||
Location gateLocation = gateAtLocation.getLocation();
|
||||
Location playerLocation = event.getPlayer().getLocation();
|
||||
|
||||
Float newYaw = gateExit.getYaw() - gateExit.getYaw() + playerLocation.getYaw();
|
||||
Float newYaw = gateExit.getYaw() - gateLocation.getYaw() + playerLocation.getYaw();
|
||||
|
||||
Location teleportToLocation = new Location( gateExit.getWorld(),
|
||||
gateExit.getX(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user