public interface NucleusModuleService
|Modifier and Type||Method and Description|
Returns whether modules can be disabled.
Gets the ids of the modules to load, or the modules that have been loaded.
Removes a module from NucleusPlugin programmatically, so plugins can override the behaviour if required.
void removeModule(String module, Object plugin) throws ModulesLoadedException, UnremovableModuleException, NoModuleException
module- The id of the module to disable.
plugin- The plugin that is requesting to disable the module. Used for logging purposes - telling the user who is disabling the plugin.
ModulesLoadedException- Thrown if the modules have now been loaded and can no longer be removed.
UnremovableModuleException- Thrown if the module has been marked "cannot be disabled". Plugins are expected to honour this, NucleusPlugin does not mark any module (apart from the core) as "unable to be disabled" by default, so plugin authors are requested to not try to override any behaviour that a user has explicitly turned on.
NoModuleException- Thrown if the module does not exist.