Fixed yaw calculation for teleportation.

This commit is contained in:
Tobias Ottenweller 2013-02-09 21:01:57 +01:00
parent 0f6f05b045
commit 56d0b8bf1c

View File

@ -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(),