diff options
author | Iaccidentally <coryhuckaby@gmail.com> | 2013-01-13 15:09:05 -0800 |
---|---|---|
committer | Iaccidentally <coryhuckaby@gmail.com> | 2013-01-13 15:09:05 -0800 |
commit | 3db015b1c12627bcfaa2aee00850344ab4c1684c (patch) | |
tree | b22514ab7053aec0fb5fbd23999cfce7f1fa276e | |
parent | f82d7e806fe81123c2693e2834d8d16b25323259 (diff) | |
parent | 659d602b5789fd999311e21a04455c120b9f31c8 (diff) | |
download | Essentials-3db015b1c12627bcfaa2aee00850344ab4c1684c.tar Essentials-3db015b1c12627bcfaa2aee00850344ab4c1684c.tar.gz Essentials-3db015b1c12627bcfaa2aee00850344ab4c1684c.tar.lz Essentials-3db015b1c12627bcfaa2aee00850344ab4c1684c.tar.xz Essentials-3db015b1c12627bcfaa2aee00850344ab4c1684c.zip |
Merge pull request #260 from GunfighterJ/patch-3
Fixes /top command not carrying pitch and yaw
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandtop.java | 4 |
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")); } |