Skip to content

Commit

Permalink
fix for tabcompleters
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Dec 12, 2022
1 parent 1571370 commit 5f21d56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.xGinko</groupId>
<artifactId>BetterWorldStats</artifactId>
<version>1.1</version>
<version>1.2</version>
<packaging>jar</packaging>

<name>BetterWorldStats</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ public class BetterWSCmd implements CommandExecutor, TabCompleter {
public BetterWSCmd() {
subcommands.add(new ReloadCmd());
subcommands.add(new VersionCmd());
for (int i=0; i<getSubcommands().size(); i++) {
tabCompletes.add(getSubcommands().get(i).getName());
}
}
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
if (args.length > 0) {
for (int i=0; i<getSubcommands().size(); i++) {
tabCompletes.add(getSubcommands().get(i).getName());
}
return tabCompletes;
}
return null;
Expand Down

0 comments on commit 5f21d56

Please sign in to comment.