Fix tabComplete method.

This commit is contained in:
BONNe1704 2019-07-24 14:34:33 +03:00
parent 9681494c1c
commit 4f35f69960
3 changed files with 3 additions and 3 deletions

View File

@ -102,7 +102,7 @@ public class CompleteChallengeCommand extends CompositeCommand
case 3:
// Create suggestions with all challenges that is available for users.
returnList.addAll(this.addon.getChallengesManager().getAllChallengesNames(this.getWorld()).stream().
map(challenge -> challenge.replaceFirst(Util.getWorld(this.getWorld()).getName() + "_", "")).
map(challenge -> challenge.substring(Util.getWorld(this.getWorld()).getName().length() + 1)).
collect(Collectors.toList()));
break;

View File

@ -169,7 +169,7 @@ public class CompleteCommand extends CompositeCommand
case 4:
// Create suggestions with all challenges that is available for users.
returnList.addAll(this.addon.getChallengesManager().getAllChallengesNames(this.getWorld()).stream().
map(challenge -> challenge.replaceFirst(Util.getWorld(this.getWorld()).getName() + "_", "")).
map(challenge -> challenge.substring(Util.getWorld(this.getWorld()).getName().length() + 1)).
collect(Collectors.toList()));
break;

View File

@ -187,7 +187,7 @@ public class ResetCommand extends CompositeCommand
case 4:
// Create suggestions with all challenges that is available for users.
returnList.addAll(this.addon.getChallengesManager().getAllChallengesNames(this.getWorld()).stream().
map(challenge -> challenge.replaceFirst(Util.getWorld(this.getWorld()).getName() + "_", "")).
map(challenge -> challenge.substring(Util.getWorld(this.getWorld()).getName().length() + 1)).
collect(Collectors.toList()));
returnList.add("all");