Class Feature
java.lang.Object
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 TypeMethodDescription@NotNull FeatureConfigabstract @NotNull VersionedComponent@NotNull File@NotNull StringThe 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 FileThe data folder for this feature, located at:
/home/container/plugins/<plugin>/features/<feature>/
If the folder does not exist, it will be created automatically.@NotNull StringThe absolute path to the data folder for this feature, i.e.:
/home/container/plugins/<plugin>/features/<feature>/
This is just the File's absolute path, it does not create the folder if it does not exist.final @NotNull VersionedComponentMethods 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
-
FEATURES_FOLDER
- See Also:
-
-
Constructor Details
-
Feature
public Feature()
-
-
Method Details
-
defaultPrefix
- Specified by:
defaultPrefixin classAbstractSubsystem<FeatureConfig,Feature> - Returns:
- The default logging prefix for this subsystem (saved under the KamiPlugin featuresConfig featurePrefix)
-
getConfigFileDestination
- Specified by:
getConfigFileDestinationin 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:
getConfigResourcePathin classAbstractSubsystem<FeatureConfig,Feature>
-
createConfig
- Specified by:
createConfigin classAbstractSubsystem<FeatureConfig,Feature>
-
getPrefix
- Specified by:
getPrefixin classAbstractSubsystem<FeatureConfig,Feature> - Returns:
- The prefix for this subsystem, as defined in the subsystem config
-
getFeatureDataFolder
The data folder for this feature, located at:
/home/container/plugins/<plugin>/features/<feature>/
If the folder does not exist, it will be created automatically. -
getFeatureDataPath
The absolute path to the data folder for this feature, i.e.:
/home/container/plugins/<plugin>/features/<feature>/
This is just the File's absolute path, it does not create the folder if it does not exist.
-