mirror of
https://github.com/aikar/commands.git
synced 2026-05-31 06:11:55 +00:00
Fix NPE in help - Fixes #162
This commit is contained in:
@@ -60,8 +60,11 @@ public class CommandHelp {
|
||||
Set<RegisteredCommand> seen = new HashSet<>();
|
||||
|
||||
if (!rootCommand.getDefCommand().hasHelpCommand) {
|
||||
helpEntries.add(new HelpEntry(this, rootCommand.getDefaultRegisteredCommand()));
|
||||
seen.add(rootCommand.getDefaultRegisteredCommand());
|
||||
RegisteredCommand defCommand = rootCommand.getDefaultRegisteredCommand();
|
||||
if (defCommand != null) {
|
||||
helpEntries.add(new HelpEntry(this, defCommand));
|
||||
seen.add(defCommand);
|
||||
}
|
||||
}
|
||||
|
||||
subCommands.entries().forEach(e -> {
|
||||
|
||||
Reference in New Issue
Block a user