Skip to content

Commit

Permalink
Fix attack command
Browse files Browse the repository at this point in the history
@.@
  • Loading branch information
mcmonkey4eva committed Sep 17, 2013
1 parent b845d2f commit 843fe06
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -36,18 +36,18 @@ public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException
scriptEntry.addObject("cancel", "");
}

else if (!scriptEntry.hasObject("target")
&& arg.matchesArgumentType(dEntity.class)
&& arg.matchesPrefix("target")) {
// Single entity arg
scriptEntry.addObject("target", arg.asType(dEntity.class));
}

else if (!scriptEntry.hasObject("entities")
&& arg.matchesArgumentList(dEntity.class)) {
// Entity dList arg
scriptEntry.addObject("entities", ((dList) arg.asType(dList.class)).filter(dEntity.class));
}

else if (!scriptEntry.hasObject("target")
&& arg.matchesArgumentType(dEntity.class)
&& arg.matchesPrefix("target")) {
// Single entity arg
scriptEntry.addObject("target", arg.asType(dEntity.class));
}
}

// Use the player as the target if one is not specified
Expand Down

0 comments on commit 843fe06

Please sign in to comment.