mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-10 21:02:36 +01:00
Fix getBukkitEntity() for nulls
This commit is contained in:
parent
e20baeb870
commit
ceda94a0e5
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user