Skip to content

Commit b1d422b

Browse files
committed
Round up Y position when standing on half blocks. This should address some safelogin bugs.
1 parent 049577c commit b1d422b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Essentials/src/com/earth2me/essentials/utils/LocationUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ public static boolean shouldFly(Location loc)
325325
{
326326
final World world = loc.getWorld();
327327
final int x = loc.getBlockX();
328-
int y = loc.getBlockY();
328+
int y = (int)Math.round(loc.getY());
329329
final int z = loc.getBlockZ();
330330
while (LocationUtil.isBlockUnsafe(world, x, y, z) && y > -1)
331331
{

0 commit comments

Comments
 (0)