Skip to content

Commit

Permalink
Fix issue #134 opened by mythan.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcernat committed Mar 7, 2013
1 parent 5794472 commit 3d841a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/net/aufdemrand/denizen/tags/core/NPCTags.java
Expand Up @@ -27,6 +27,8 @@ public void npcTags(ReplaceableTagEvent event) {
if (!event.matches("npc")) return;

dNPC n = event.getNPC();
if (n == null) return; // to avoid NPE in scripts with no NPC attached

String type = event.getType() != null ? event.getType().toUpperCase() : "";
String subType = event.getSubType() != null ? event.getSubType().toUpperCase() : "";

Expand Down

0 comments on commit 3d841a6

Please sign in to comment.