Class Module
java.lang.Object
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 TypeMethodDescription@NotNull ModuleConfigabstract @NotNull VersionedComponent@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 FileThe data folder for this module, located at:
/home/container/plugins/<plugin>/modules/<module>/
If the folder does not exist, it will be created automatically.@NotNull StringThe absolute path to the data folder for this module, i.e.:
/home/container/plugins/<plugin>/modules/<module>/
This is just the File's absolute path, it does not create the folder if it does not exist.final @NotNull VersionedComponentabstract booleanfinal booleanMethods inherited from class com.kamikazejam.kamicommon.subsystem.AbstractSubsystem
buildMessage, buildMiniMessage, getConfig, getKamiConfig, getMessage, getMiniMessage, getName, getPlugin, getSupplementalConfigResource, getSupplementalConfigResource, handleDisable, handleEnable, initializeConfig, 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
The data folder for this module, located at:
/home/container/plugins/<plugin>/modules/<module>/
If the folder does not exist, it will be created automatically. -
getModuleDataPath
The absolute path to the data folder for this module, i.e.:
/home/container/plugins/<plugin>/modules/<module>/
This is just the File's absolute path, it does not create the folder if it does not exist.
-