got the tab complete index wrong

This commit is contained in:
sekwah 2018-01-23 18:36:39 +00:00 committed by Sekwah
parent e6a515201d
commit a762b58663

View File

@ -96,7 +96,7 @@ public class CommandWithSubCommands implements CommandTemplate {
@Override
public List<String> onTabComplete(CommandSenderContainer sender, String[] args) {
if(args.length > 0) {
if(args.length > 1) {
for (String subCommandName : this.subCommandRegistry.getSubCommands()) {
if (subCommandName.equalsIgnoreCase(args[0])) {
SubCommand subCommand = this.getSubCommand(subCommandName);