Call forEach on values instead of SetMultimap

This commit is contained in:
Frank van der Heijden 2020-07-21 23:53:18 +02:00
parent 0ed6747e4b
commit 86e8c3a9e6
No known key found for this signature in database
GPG key ID: 26DA56488D314D11

View file

@ -85,7 +85,7 @@ public class CommandServerUtils extends BaseCommand {
.filter(c -> !ALIASES.contains(c.getCommandName().toLowerCase()))
.forEach(rootCommand -> {
builder.add(rootCommand.getCommandName(), "", rootCommand.getDescription());
rootCommand.getSubCommands().forEach((str, cmd) -> {
rootCommand.getSubCommands().values().forEach(cmd -> {
if (cmd.getPrefSubCommand().isEmpty()) return;
builder.add(rootCommand.getCommandName(), " " + cmd.getPrefSubCommand(), cmd.getHelpText());
});