mirror of
https://github.com/funkemunky/AntiVPN.git
synced 2026-05-31 09:31:54 +00:00
Add command suggestion for empty args
This commit is contained in:
@@ -12,6 +12,7 @@ import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
public class VelocityCommand implements SimpleCommand {
|
||||
@@ -78,7 +79,10 @@ public class VelocityCommand implements SimpleCommand {
|
||||
.mapToObj(i -> args[i + 1]).toArray(String[]::new));
|
||||
}
|
||||
}
|
||||
}else if (children.length > 0){ // && args.length == 0 is always true here
|
||||
return Arrays.stream(children).map(Command::name).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
return command.tabComplete(new VelocityCommandExecutor(sender), "alias", args);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user