//Add new instance of Commands Module to registerModules method in configure method @OverrideprotectedLibraryConfigurationconfigure() { commandsModule =newCommandsModule(this);//or use your own command configurator commandsModule =newCommandsModule(this,new MyCommandConfigurator());returnnewLibraryConfiguration(this, getConfiguratorsInitializer()).builder().setGameManager(newMyGameManager(this, settings, messages)).registerModules(commandsModule) //new way how to register command module.build(); }
How to define command configurator?
publicclassMyCommandConfiguratorextendsDefaultCommandConfigurator { @OverridepublicCommandConfigurationconfigure() {returnCommandConfiguration.builder().doNotHavePermissionMessage("No permission").onlyPlayersMessage("Only players can use this command").build(); }}