Add ability to complete challenge multiple times at once via command.

This commit is contained in:
BONNe 2019-06-16 20:43:07 +03:00
parent 526fe9ce81
commit 4e2181f524

View File

@ -69,6 +69,8 @@ public class CompleteChallengeCommand extends CompositeCommand
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,
@ -76,7 +78,8 @@ public class CompleteChallengeCommand extends CompositeCommand
challenge,
this.getWorld(),
this.getTopLabel(),
this.getPermissionPrefix());
this.getPermissionPrefix(),
count);
}
else
{