Fix NPE in help - Fixes #162

This commit is contained in:
Aikar
2019-02-25 22:27:03 -05:00
parent 4c29b44477
commit 5d11925813
@@ -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 -> {