Merge pull request #260 from GunfighterJ/patch-3

Fixes /top command not carrying pitch and yaw
This commit is contained in:
Iaccidentally 2013-01-13 15:09:05 -08:00
commit 3db015b1c1

View File

@ -20,7 +20,9 @@ public class Commandtop extends EssentialsCommand
{ {
final int topX = user.getLocation().getBlockX(); final int topX = user.getLocation().getBlockX();
final int topZ = user.getLocation().getBlockZ(); 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.getTeleport().teleport(location, new Trade(this.getName(), ess), TeleportCause.COMMAND);
user.sendMessage(_("teleportTop")); user.sendMessage(_("teleportTop"));
} }