diff --git a/src/de/steamwar/command/AbstractSWCommand.java b/src/de/steamwar/command/AbstractSWCommand.java index 65f6643..3a44271 100644 --- a/src/de/steamwar/command/AbstractSWCommand.java +++ b/src/de/steamwar/command/AbstractSWCommand.java @@ -102,7 +102,7 @@ public abstract class AbstractSWCommand { protected final List tabComplete(T sender, String alias, String[] args) throws IllegalArgumentException { initialize(); - String string = args[args.length - 1].toLowerCase(); + String string = args.length > 0 ? args[args.length - 1].toLowerCase() : ""; return Stream.concat(commandList.stream(), helpCommandList.stream()) .filter(s -> !s.noTabComplete) .map(s -> s.tabComplete(sender, args))