mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-24 17:11:58 +01:00
Add instance check to NavigableEntity
This commit is contained in:
parent
96d581a49f
commit
97b7e122e9
@ -110,6 +110,11 @@ public interface NavigableEntity {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Can't path with a null instance.
|
||||
if (instance == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Can't path outside of the world border
|
||||
final WorldBorder worldBorder = instance.getWorldBorder();
|
||||
if (!worldBorder.isInside(position)) {
|
||||
|
Loading…
Reference in New Issue
Block a user