Skip to content

Commit

Permalink
Implement toString in BukkitScriptEntryData
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jan 13, 2015
1 parent 825af35 commit 66c14ef
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/net/aufdemrand/denizen/BukkitScriptEntryData.java
Expand Up @@ -66,4 +66,20 @@ public void transferDataFrom(ScriptEntryData scriptEntryData) {
public TagContext getTagContext() {
return new BukkitTagContext(player, npc, false, null, true, null);
}

@Override
public String toString() {
if (npc == null && player == null) {
return "";
}
else if (npc == null) {
return "player=p@" + player.getName();
}
else if (player == null) {
return "npc=n@" + npc.getId();
}
else {
return "player=p@" + player.getName() + " npc=n@" + npc.getId();
}
}
}

0 comments on commit 66c14ef

Please sign in to comment.