mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-25 04:37:44 +00:00
Fix /top so that glass counts as a real block.
This commit is contained in:
parent
dd12e5db66
commit
17adafecf9
|
@ -368,7 +368,7 @@ public class Util
|
|||
while (isBlockUnsafe(world, x, y, z))
|
||||
{
|
||||
y += 1;
|
||||
if (y >= world.getHighestBlockYAt(x, z))
|
||||
if (y >= world.getMaxHeight())
|
||||
{
|
||||
x += 1;
|
||||
break;
|
||||
|
|
|
@ -20,8 +20,8 @@ public class Commandtop extends EssentialsCommand
|
|||
{
|
||||
final int topX = user.getLocation().getBlockX();
|
||||
final int topZ = user.getLocation().getBlockZ();
|
||||
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(this.getName(), ess), TeleportCause.COMMAND);
|
||||
final Location location = new Location(user.getWorld(), topX, user.getWorld().getMaxHeight(), topZ);
|
||||
user.getTeleport().teleport(location, new Trade(this.getName(), ess), TeleportCause.COMMAND);
|
||||
user.sendMessage(_("teleportTop"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue