Citizens NPC location must not be null, fixes #2332

This commit is contained in:
PikaMug 2025-02-21 11:44:23 -05:00
parent 56f1a2e4d7
commit da367f3b67

View File

@ -60,7 +60,7 @@ public class BukkitCitizensDependency implements BukkitNpcDependency, BukkitEnti
for (final NPC npc : citizens.getNPCRegistry()) {
final UUID uuid = npc.getUniqueId();
final Location location = npc.getStoredLocation();
if (location.getWorld() == null) {
if (location == null || location.getWorld() == null) {
continue;
}
if (predicate.test(uuid, location)) {