Skip to content

Commit

Permalink
Add ability to complete challenge multiple times at once via command.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Jun 16, 2019
1 parent 526fe9c commit 4e2181f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,17 @@ else if (!args.get(0).isEmpty())
String challengeName = Util.getWorld(this.getWorld()).getName() + "_" + args.get(0);
Challenge challenge = this.addon.getChallengesManager().getChallenge(challengeName);

int count = args.size() == 2 ? Integer.valueOf(args.get(1)) : 1;

if (challenge != null)
{
return TryToComplete.complete(this.addon,
user,
challenge,
this.getWorld(),
this.getTopLabel(),
this.getPermissionPrefix());
this.getPermissionPrefix(),
count);
}
else
{
Expand Down

0 comments on commit 4e2181f

Please sign in to comment.