Class Module
java.lang.Object
com.kamikazejam.kamicommon.util.log.LoggerService
com.kamikazejam.kamicommon.subsystem.AbstractSubsystem<ModuleConfig,Module>
com.kamikazejam.kamicommon.subsystem.module.Module
- All Implemented Interfaces:
ObservableConfig,CoreMethods
This class represents a single module registered under your
A module is a toggleable subsystem that acts like its own plugin, providing its own functionality and configuration.
For a subsystem that cannot be toggled or disabled, see
KamiPlugin plugin.A module is a toggleable subsystem that acts like its own plugin, providing its own functionality and configuration.
For a subsystem that cannot be toggled or disabled, see
Feature.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull ModuleConfigabstract @NotNull String@NotNull File@NotNull StringThe name of the config file (IN SOURCE CODE) for this Module.
By default, it is fetched asKamiPlugin.getModuleYmlPath()/[name]Module.yml
You can override this method, or editKamiPlugin.getModuleYmlPath()to change the path resolution.@NotNull Filefinal @NotNull Stringabstract booleanfinal booleanMethods inherited from class com.kamikazejam.kamicommon.subsystem.AbstractSubsystem
buildMessage, getConfig, getKamiConfig, getLoggerName, getMessage, getName, getPlugin, getSupplementalConfigResource, handleDisable, handleEnable, initializeConfig, isDebug, logToConsole, onDisable, onDisableLater, onEnable, registerCommands, registerConfigObserver, registerDisableables, registerListeners, registerReloadHook, registerTasks, reloadConfig, reloadObservableConfig, saveConfig, unregisterCommands, unregisterCommands, unregisterConfigObserver, unregisterConfigObservers, unregisterDisableables, unregisterDisableables, unregisterListeners, unregisterListeners, unregisterTasks, unregisterTasks
-
Field Details
-
MODULES_FOLDER
- See Also:
-
-
Constructor Details
-
Module
public Module()
-
-
Method Details
-
isEnabledByDefault
public abstract boolean isEnabledByDefault()- Returns:
- Whether this module is enabled by default (generally always true, except in specific situations)
-
defaultPrefix
- Specified by:
defaultPrefixin classAbstractSubsystem<ModuleConfig,Module> - Returns:
- The default logging prefix for this subsystem (saved under the KamiPlugin modulesConfig modulePrefix)
-
getConfigFileDestination
- Specified by:
getConfigFileDestinationin classAbstractSubsystem<ModuleConfig,Module>
-
getConfigResourcePath
The name of the config file (IN SOURCE CODE) for this Module.
By default, it is fetched asKamiPlugin.getModuleYmlPath()/[name]Module.yml
You can override this method, or editKamiPlugin.getModuleYmlPath()to change the path resolution.- Specified by:
getConfigResourcePathin classAbstractSubsystem<ModuleConfig,Module>
-
createConfig
- Specified by:
createConfigin classAbstractSubsystem<ModuleConfig,Module>
-
isEnabledInConfig
@Internal public final boolean isEnabledInConfig() -
getPrefix
- Specified by:
getPrefixin classAbstractSubsystem<ModuleConfig,Module> - Returns:
- The prefix for this subsystem, as defined in the subsystem config
-
getModuleDataFolder
-