Skip to content

Commit

Permalink
Fix tabComplete method.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Jul 24, 2019
1 parent 9681494 commit 4f35f69
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public Optional<List<String>> tabComplete(User user, String alias, List<String>
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public Optional<List<String>> tabComplete(User user, String alias, List<String>
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public Optional<List<String>> tabComplete(User user, String alias, List<String>
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");
Expand Down

0 comments on commit 4f35f69

Please sign in to comment.