public static interface NucleusModuleEvent.AboutToConstruct extends NucleusModuleEvent
NucleusModuleEvent.AboutToConstruct, NucleusModuleEvent.AboutToEnable, NucleusModuleEvent.Complete, NucleusModuleEvent.Enabled, NucleusModuleEvent.ModuleEnableState, NucleusModuleEvent.PreEnable
Modifier and Type | Method and Description |
---|---|
void |
disableModule(String module,
Object plugin)
Disables the named module.
|
getModuleList
void disableModule(String module, Object plugin) throws 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.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.