From bacf3666432f861cc0cf014b753c927205840eb6 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Thu, 4 Jul 2024 09:04:38 +0200 Subject: [PATCH] Fix SWCommand with 0 args Signed-off-by: Lixfel --- src/de/steamwar/command/SWCommand.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/command/SWCommand.java b/src/de/steamwar/command/SWCommand.java index 9b931a3..52845d2 100644 --- a/src/de/steamwar/command/SWCommand.java +++ b/src/de/steamwar/command/SWCommand.java @@ -83,7 +83,11 @@ public class SWCommand extends AbstractSWCommand { @Override public List suggest(Invocation invocation) { - return SWCommand.this.tabComplete(Chatter.of(invocation.source()), invocation.alias(), invocation.arguments()); + String[] args = invocation.arguments(); + if(args.length == 0) + args = new String[]{""}; + + return SWCommand.this.tabComplete(Chatter.of(invocation.source()), invocation.alias(), args); } @Override