Fix getBukkitEntity() for nulls

This commit is contained in:
fullwall 2013-11-06 00:58:20 +08:00
parent e20baeb870
commit ceda94a0e5

View File

@ -90,7 +90,7 @@ public class CitizensNPC extends AbstractNPC {
return null;
}
Entity entity = entityController.getBukkitEntity();
if (entity instanceof LivingEntity) {
if (entity == null || entity instanceof LivingEntity) {
return (LivingEntity) entity;
}
throw new IllegalStateException("getBukkitEntity() called on a non-living NPC");