mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-14 06:36:34 +01:00
Fix tabComplete method.
This commit is contained in:
parent
9681494c1c
commit
4f35f69960
@ -102,7 +102,7 @@ public class CompleteChallengeCommand extends CompositeCommand
|
|||||||
case 3:
|
case 3:
|
||||||
// Create suggestions with all challenges that is available for users.
|
// Create suggestions with all challenges that is available for users.
|
||||||
returnList.addAll(this.addon.getChallengesManager().getAllChallengesNames(this.getWorld()).stream().
|
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()));
|
collect(Collectors.toList()));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -169,7 +169,7 @@ public class CompleteCommand extends CompositeCommand
|
|||||||
case 4:
|
case 4:
|
||||||
// Create suggestions with all challenges that is available for users.
|
// Create suggestions with all challenges that is available for users.
|
||||||
returnList.addAll(this.addon.getChallengesManager().getAllChallengesNames(this.getWorld()).stream().
|
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()));
|
collect(Collectors.toList()));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -187,7 +187,7 @@ public class ResetCommand extends CompositeCommand
|
|||||||
case 4:
|
case 4:
|
||||||
// Create suggestions with all challenges that is available for users.
|
// Create suggestions with all challenges that is available for users.
|
||||||
returnList.addAll(this.addon.getChallengesManager().getAllChallengesNames(this.getWorld()).stream().
|
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()));
|
collect(Collectors.toList()));
|
||||||
|
|
||||||
returnList.add("all");
|
returnList.add("all");
|
||||||
|
Loading…
Reference in New Issue
Block a user