summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunfighterJ <joseph.jenniges@gmail.com>2013-01-13 17:02:46 -0600
committerGunfighterJ <joseph.jenniges@gmail.com>2013-01-13 17:02:46 -0600
commit659d602b5789fd999311e21a04455c120b9f31c8 (patch)
treeb22514ab7053aec0fb5fbd23999cfce7f1fa276e
parentf82d7e806fe81123c2693e2834d8d16b25323259 (diff)
downloadEssentials-659d602b5789fd999311e21a04455c120b9f31c8.tar
Essentials-659d602b5789fd999311e21a04455c120b9f31c8.tar.gz
Essentials-659d602b5789fd999311e21a04455c120b9f31c8.tar.lz
Essentials-659d602b5789fd999311e21a04455c120b9f31c8.tar.xz
Essentials-659d602b5789fd999311e21a04455c120b9f31c8.zip
Fixes /top command not carrying pitch and yaw
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtop.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtop.java b/Essentials/src/com/earth2me/essentials/commands/Commandtop.java
index fe7690646..89c5c6f8f 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtop.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtop.java
@@ -20,7 +20,9 @@ public class Commandtop extends EssentialsCommand
{
final int topX = user.getLocation().getBlockX();
final int topZ = user.getLocation().getBlockZ();
- final Location location = new Location(user.getWorld(), topX, user.getWorld().getMaxHeight(), topZ);
+ final float pitch = user.getLocation().getPitch();
+ final float yaw = user.getLocation().getYaw();
+ final Location location = new Location(user.getWorld(), topX, user.getWorld().getMaxHeight(), topZ, yaw, pitch);
user.getTeleport().teleport(location, new Trade(this.getName(), ess), TeleportCause.COMMAND);
user.sendMessage(_("teleportTop"));
}