Package net.orbyfied.j8.config
Interface Configuration
- All Known Implementing Classes:
AbstractConfiguration
public interface Configuration
Represents a configuration for a holder
that can be saved and loaded. Always
related to a
Configurable-
Method Summary
Modifier and TypeMethodDescriptionConfigurable<?>Get the holder of this configuration.default voidload(org.bukkit.configuration.ConfigurationSection config) Loads the data from the configuration section into this configuration.default voidsave(org.bukkit.configuration.ConfigurationSection config) Saves the data from this configuration into the provided configuration section.default voidwhenLoaded(org.bukkit.configuration.ConfigurationSection config) Called when a configuration has been loaded.default voidwhenSaved(org.bukkit.configuration.ConfigurationSection config) Called when a configuration has been saved.
-
Method Details
-
getConfigurable
Configurable<?> getConfigurable()Get the holder of this configuration. Aka. the configurable.- Returns:
- The configurable.
-
whenLoaded
default void whenLoaded(org.bukkit.configuration.ConfigurationSection config) Called when a configuration has been loaded. Used to, for example, fill additional fields and data.- Parameters:
config- The configuration section.
-
whenSaved
default void whenSaved(org.bukkit.configuration.ConfigurationSection config) Called when a configuration has been saved. Used to, for example, save additional fields and data.- Parameters:
config- The configuration section.
-
load
default void load(org.bukkit.configuration.ConfigurationSection config) Loads the data from the configuration section into this configuration.- Parameters:
config- The configuration section.
-
save
default void save(org.bukkit.configuration.ConfigurationSection config) Saves the data from this configuration into the provided configuration section.- Parameters:
config- The configuration section.
-