1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-18 20:41:37 +02:00

Keep orientation while teleporting up

This commit is contained in:
snowleo
2012-07-12 12:22:54 +02:00
parent c3e261d60a
commit 210f7fe749

View File

@@ -15,7 +15,7 @@ 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 int topY = user.getWorld().getHighestBlockYAt(topX, topZ); final int topY = user.getWorld().getHighestBlockYAt(topX, topZ);
user.getTeleport().teleport(new Location(user.getWorld(), user.getLocation().getX(), topY + 1, user.getLocation().getZ()), new Trade(commandName, ess), TeleportCause.COMMAND); user.getTeleport().teleport(new Location(user.getWorld(), user.getLocation().getX(), topY + 1, user.getLocation().getZ(), user.getLocation().getYaw(), user.getLocation().getPitch()), new Trade(commandName, ess), TeleportCause.COMMAND);
user.sendMessage(_("teleportTop")); user.sendMessage(_("teleportTop"));
} }
} }