Skip to content

Commit

Permalink
re-add missing check for register_commands option (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
Grabsky authored Jan 10, 2025
1 parent ece0682 commit ca5bc11
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/java/de/oliver/fancynpcs/FancyNpcs.java
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,14 @@ Please update to the newest version (%s).

// Creating new instance of CloudCommandManager and registering all needed components.
// NOTE: Brigadier is disabled by default. More detailed information about that can be found in CloudCommandManager class.
commandManager = new CloudCommandManager(this, false)
.registerArguments()
.registerExceptionHandlers()
.registerCommands();
if (config.isRegisterCommands()) {
commandManager = new CloudCommandManager(this, false)
.registerArguments()
.registerExceptionHandlers()
.registerCommands();
} else {
getLogger().warning("Commands and related components have not been registered. This can be changed by setting 'register_commands' to true, and restarting the server.");
}

fancyLogger.info("FancyNpcs (" + versionConfig.getVersion() + ") has been enabled.");
}
Expand Down

0 comments on commit ca5bc11

Please sign in to comment.