From 56d0b8bf1c3d04d7335bb6908160f45ab0271c55 Mon Sep 17 00:00:00 2001 From: Tobias Ottenweller Date: Sat, 9 Feb 2013 21:01:57 +0100 Subject: [PATCH] Fixed yaw calculation for teleportation. --- src/de/craftinc/gates/listeners/PluginPlayerListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/craftinc/gates/listeners/PluginPlayerListener.java b/src/de/craftinc/gates/listeners/PluginPlayerListener.java index f8bff3d..233bf70 100644 --- a/src/de/craftinc/gates/listeners/PluginPlayerListener.java +++ b/src/de/craftinc/gates/listeners/PluginPlayerListener.java @@ -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(),