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:
@@ -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"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user