mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-27 13:15:33 +01:00
Fix getBukkitEntity() for nulls
This commit is contained in:
parent
dd58a07528
commit
7c45b167c0
@ -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