Skip to content

Commit

Permalink
Go away, NPE!
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Aug 22, 2013
1 parent b7a49b0 commit ca8b14c
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -36,6 +36,8 @@ else if (event.getDamager() instanceof Projectile
dNPC npc = DenizenAPI.getDenizenNPC(CitizensAPI.getNPCRegistry().getNPC(event.getEntity()));
if (npc == null)
return;
if (npc.getCitizen() == null)
return;

if (!npc.getCitizen().hasTrait(TriggerTrait.class)) return;
if (!npc.getTriggerTrait().isEnabled(name)) return;
Expand Down

0 comments on commit ca8b14c

Please sign in to comment.