Skip to content

Commit 7544559

Browse files
committed
Sort help entries by alphabetical order
1 parent a64c70d commit 7544559

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/src/main/java/revxrsal/commands/core/BaseCommandHelp.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ public Resolver(BaseCommandHandler handler) {
4949
BaseCommandHelp<Object> entries = new BaseCommandHelp<>();
5050
CommandCategory parent = helpCommand.getParent();
5151
CommandPath parentPath = parent == null ? null : parent.getPath();
52-
for (CommandExecutable c : handler.executables.values()) {
52+
handler.executables.values().stream().sorted().forEach(c -> {
5353
if (parentPath == null || parentPath.isParentOf(c.getPath())) {
5454
if (c != helpCommand)
5555
entries.add(writer.generate(c, context.actor()));
5656
}
57-
}
57+
});
5858
return entries;
5959
}
6060
}

0 commit comments

Comments
 (0)