public interface NucleusModuleService
Modifier and Type | Method and Description |
---|---|
boolean |
canDisableModules()
Returns whether modules can be disabled.
|
Set<String> |
getModulesToLoad()
Gets the ids of the modules to load, or the modules that have been loaded.
|
void |
removeModule(String module,
Object plugin)
Removes a module from NucleusPlugin programmatically, so plugins can override the behaviour if required.
|
Set<String> getModulesToLoad()
boolean canDisableModules()
true
if so.void removeModule(String module, Object plugin) throws ModulesLoadedException, UnremovableModuleException, NoModuleException
canDisableModules()
is true
.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.