Skip to content

Commit

Permalink
Fix a minor error in the health command
Browse files Browse the repository at this point in the history
Woops, my bad!
Doesn't seem to be a disruptive error, just throws a stacktrace and
moves on (according to the user who found it)
  • Loading branch information
mcmonkey4eva committed Dec 17, 2013
1 parent 1e05cf3 commit 67ce1da
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -28,7 +28,7 @@ public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException
&& arg.matches("player")) {
if (!scriptEntry.hasPlayer())
throw new InvalidArgumentsException("No player attached!");
scriptEntry.addObject("target", Arrays.asList(scriptEntry.getPlayer()));
scriptEntry.addObject("target", Arrays.asList(scriptEntry.getPlayer().getDenizenEntity()));
}

else if (!scriptEntry.hasObject("qty")
Expand All @@ -54,7 +54,7 @@ else if (!scriptEntry.hasObject("action")
if (!scriptEntry.hasObject("target")) {
if (!scriptEntry.hasNPC())
throw new InvalidArgumentsException("Missing NPC!");
scriptEntry.addObject("target", Arrays.asList(scriptEntry.getNPC()));
scriptEntry.addObject("target", Arrays.asList(scriptEntry.getNPC().getDenizenEntity()));
}

}
Expand Down

0 comments on commit 67ce1da

Please sign in to comment.