Add instance check to NavigableEntity

This commit is contained in:
LeoDog896 2021-01-13 07:54:06 -05:00
parent 96d581a49f
commit 97b7e122e9

View File

@ -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)) {