mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-08 08:21:44 +01:00
Fix safelogin for 1.18 and above by using worldProvider minHeight (#4715)
This commit is contained in:
parent
5f98d3fac5
commit
739600eb05
@ -266,6 +266,7 @@ public final class LocationUtil {
|
||||
int y = (int) Math.round(loc.getY());
|
||||
final int z = loc.getBlockZ();
|
||||
int count = 0;
|
||||
// Check whether more than 2 unsafe block are below player.
|
||||
while (LocationUtil.isBlockUnsafe(ess, world, x, y, z) && y >= ess.getWorldInfoProvider().getMinHeight(world)) {
|
||||
y--;
|
||||
count++;
|
||||
@ -274,7 +275,8 @@ public final class LocationUtil {
|
||||
}
|
||||
}
|
||||
|
||||
return y < 0;
|
||||
// If not then check if player is in the void
|
||||
return y < ess.getWorldInfoProvider().getMinHeight(world);
|
||||
}
|
||||
|
||||
public static class Vector3D {
|
||||
|
Loading…
Reference in New Issue
Block a user