mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
Ignore searching top block for teleportation
This commit is contained in:
parent
2b1905889c
commit
355e16fe92
@ -172,7 +172,8 @@ public class BukkitUtil extends WorldUtil {
|
|||||||
@Override
|
@Override
|
||||||
public int getHighestBlock(String world, int x, int z) {
|
public int getHighestBlock(String world, int x, int z) {
|
||||||
World bukkitWorld = getWorld(world);
|
World bukkitWorld = getWorld(world);
|
||||||
for (int y = bukkitWorld.getMaxHeight() - 1; y > 0; y--) {
|
// Skip top and bottom block
|
||||||
|
for (int y = bukkitWorld.getMaxHeight() - 2; y > 0; y--) {
|
||||||
Block block = bukkitWorld.getBlockAt(x, y, z);
|
Block block = bukkitWorld.getBlockAt(x, y, z);
|
||||||
if (block != null) {
|
if (block != null) {
|
||||||
Material type = block.getType();
|
Material type = block.getType();
|
||||||
@ -189,7 +190,7 @@ public class BukkitUtil extends WorldUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return bukkitWorld.getMaxHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user