Skip to content

Commit

Permalink
Sort help entries by alphabetical order
Browse files Browse the repository at this point in the history
  • Loading branch information
Revxrsal committed Apr 22, 2022
1 parent a64c70d commit 7544559
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ public Resolver(BaseCommandHandler handler) {
BaseCommandHelp<Object> entries = new BaseCommandHelp<>();
CommandCategory parent = helpCommand.getParent();
CommandPath parentPath = parent == null ? null : parent.getPath();
for (CommandExecutable c : handler.executables.values()) {
handler.executables.values().stream().sorted().forEach(c -> {
if (parentPath == null || parentPath.isParentOf(c.getPath())) {
if (c != helpCommand)
entries.add(writer.generate(c, context.actor()));
}
}
});
return entries;
}
}
Expand Down

0 comments on commit 7544559

Please sign in to comment.