Check for null world in spawn

This commit is contained in:
fullwall 2018-07-24 19:52:35 +08:00
parent 4346ed0b19
commit 0d5d5c4ac6

View File

@ -191,6 +191,10 @@ public class CitizensNPC extends AbstractNPC {
Messaging.debug("Tried to spawn", getId(), "while already spawned.");
return false;
}
if (at.getWorld() == null) {
Messaging.debug("Tried to spawn", getId(), "but the world was null.");
return false;
}
data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
at = at.clone();