Skip to content

Commit e011bfe

Browse files
committed
Fix null help entries being added to the generated help
1 parent 7544559 commit e011bfe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ public Resolver(BaseCommandHandler handler) {
5151
CommandPath parentPath = parent == null ? null : parent.getPath();
5252
handler.executables.values().stream().sorted().forEach(c -> {
5353
if (parentPath == null || parentPath.isParentOf(c.getPath())) {
54-
if (c != helpCommand)
55-
entries.add(writer.generate(c, context.actor()));
54+
if (c != helpCommand) {
55+
Object generated = writer.generate(c, context.actor());
56+
if (generated != null) entries.add(generated);
57+
}
5658
}
5759
});
5860
return entries;

0 commit comments

Comments
 (0)