Skip to main content
The ModulesManager handles the registration, loading, and management of plugin modules that extend SuperiorSkyblock2 functionality.

Methods

registerModule

void registerModule(PluginModule pluginModule)
PluginModule registerModule(File moduleFile) throws IOException, ReflectiveOperationException
Register a new module to the plugin.
pluginModule
PluginModule
required
The module to register
moduleFile
File
The module file to register from
return
PluginModule
The registered plugin module (when registering from file)
throws
IOException
If there’s an error reading the module file
throws
ReflectiveOperationException
If there’s an error loading the module class

unregisterModule

void unregisterModule(PluginModule pluginModule)
Unregister a module from the plugin.
pluginModule
PluginModule
required
The module to unregister

getModule

PluginModule getModule(String name)
Get a module by its name.
name
String
required
The name of the module
return
PluginModule
The module instance or null if not found

getModules

Collection<PluginModule> getModules()
Get all the active modules currently running.
return
Collection<PluginModule>
Collection of all active modules

Module Loading

enableModule

void enableModule(PluginModule pluginModule)
Enable a specific module.
pluginModule
PluginModule
required
The module to load

enableModules

void enableModules(ModuleLoadTime moduleLoadTime)
Enable all modules with a specific module load time.
moduleLoadTime
ModuleLoadTime
required
The module load time to load modules with

ModuleLoadTime

The ModuleLoadTime enum specifies when a module should be loaded during plugin initialization. Common values include:
  • BEFORE_WORLD_CREATION - Load before worlds are created
  • NORMAL - Load during normal plugin initialization
  • AFTER_MODULE_DATA - Load after module data is loaded