Class Configuration
java.lang.Object
fr.prodrivers.bukkit.commons.configuration.AbstractAttributeConfiguration
fr.prodrivers.bukkit.commons.configuration.file.AbstractFileAttributeConfiguration
fr.prodrivers.bukkit.commons.configuration.Configuration
Configuration helper for Prodrivers plugins.
It represents configuration options using class fields, by saving and loading fields from and inside the plugin's
configuration file, using an underlying AbstractAttributeConfiguration
.
It supports all data types supported by Bukkit's FileConfiguration
.
ExcludedFromConfiguration
annotation allows specific fields not to
be used by the field processor.
As with every AbstractAttributeConfiguration
derivative, AbstractAttributeConfiguration.init()
have to be called immediately after
constructing the object, either at the end of the constructor or outside of it.
-
Field Summary
Fields inherited from class fr.prodrivers.bukkit.commons.configuration.file.AbstractFileAttributeConfiguration
configuration
-
Constructor Summary
ConstructorsConstructorDescriptionConfiguration
(org.bukkit.plugin.Plugin plugin, Messages messages) Configuration helper constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet the initialized Messages instance.void
Set chat instance to be managed.Methods inherited from class fr.prodrivers.bukkit.commons.configuration.file.AbstractFileAttributeConfiguration
filterFieldName, getConfiguration
Methods inherited from class fr.prodrivers.bukkit.commons.configuration.AbstractAttributeConfiguration
init, load, registerAction, reload, save, saveDefaults
-
Constructor Details
-
Configuration
Configuration helper constructor. Intended to be used with a dependency injector.- Parameters:
plugin
- Plugin initializing the helpermessages
- Messages instance to manage, uses this to provide your own inheriting class that adds its own message fields
-
-
Method Details
-
setChat
Set chat instance to be managed.- Parameters:
chat
- Chat instance to manage
-
getMessages
Get the initialized Messages instance.- Returns:
- Messages instance
-