From ceda94a0e58f1bf5605352170d4f841e1a972ec7 Mon Sep 17 00:00:00 2001 From: fullwall Date: Wed, 6 Nov 2013 00:58:20 +0800 Subject: [PATCH] Fix getBukkitEntity() for nulls --- src/main/java/net/citizensnpcs/npc/CitizensNPC.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/citizensnpcs/npc/CitizensNPC.java b/src/main/java/net/citizensnpcs/npc/CitizensNPC.java index 73de11cb9..4fb51788c 100644 --- a/src/main/java/net/citizensnpcs/npc/CitizensNPC.java +++ b/src/main/java/net/citizensnpcs/npc/CitizensNPC.java @@ -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");