Class Feature
java.lang.Object
com.kamikazejam.kamicommon.util.log.LoggerService
com.kamikazejam.kamicommon.subsystem.AbstractSubsystem<FeatureConfig,Feature>
com.kamikazejam.kamicommon.subsystem.feature.Feature
- All Implemented Interfaces:
ObservableConfig
,CoreMethods
This class represents a single feature registered under your
A feature is a subsystem that acts like its own plugin, providing its own functionality and configuration.
Features cannot be disabled or toggled, they are always enabled.
For a subsystem that can be toggled or disabled, see
KamiPlugin
plugin.A feature is a subsystem that acts like its own plugin, providing its own functionality and configuration.
Features cannot be disabled or toggled, they are always enabled.
For a subsystem that can be toggled or disabled, see
Module
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull FeatureConfig
abstract @NotNull String
@NotNull File
@NotNull String
The name of the config file (IN SOURCE CODE) for this Feature.
By default, it is fetched asKamiPlugin.getFeatureYmlPath()
/[name]Feature.yml
You can override this method, or editKamiPlugin.getFeatureYmlPath()
to change the path resolution.@NotNull File
final @NotNull String
Methods 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
-
FEATURES_FOLDER
- See Also:
-
-
Constructor Details
-
Feature
public Feature()
-
-
Method Details
-
defaultPrefix
- Specified by:
defaultPrefix
in classAbstractSubsystem<FeatureConfig,
Feature> - Returns:
- The default logging prefix for this subsystem (saved under the KamiPlugin featuresConfig featurePrefix)
-
getConfigFileDestination
- Specified by:
getConfigFileDestination
in classAbstractSubsystem<FeatureConfig,
Feature>
-
getConfigResourcePath
The name of the config file (IN SOURCE CODE) for this Feature.
By default, it is fetched asKamiPlugin.getFeatureYmlPath()
/[name]Feature.yml
You can override this method, or editKamiPlugin.getFeatureYmlPath()
to change the path resolution.- Specified by:
getConfigResourcePath
in classAbstractSubsystem<FeatureConfig,
Feature>
-
createConfig
- Specified by:
createConfig
in classAbstractSubsystem<FeatureConfig,
Feature>
-
getPrefix
- Specified by:
getPrefix
in classAbstractSubsystem<FeatureConfig,
Feature> - Returns:
- The prefix for this subsystem, as defined in the subsystem config
-
getFeatureDataFolder
-