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, init() have to be called immediately after constructing the object.
-
Constructor Summary
ConstructorsConstructorDescriptionConfiguration
(org.bukkit.plugin.Plugin plugin, Class<? extends Messages> messagesClass, Chat chat) Configuration helper constructor. -
Method Summary
Methods inherited from class fr.prodrivers.bukkit.commons.configuration.file.AbstractFileAttributeConfiguration
filterFieldName, getConfiguration
Methods inherited from class fr.prodrivers.bukkit.commons.configuration.AbstractAttributeConfiguration
init, reload, save
-
Constructor Details
-
Configuration
public Configuration(org.bukkit.plugin.Plugin plugin, Class<? extends Messages> messagesClass, Chat chat) Configuration helper constructor.- Parameters:
plugin
- Plugin initializing the helpermessagesClass
- Messages class to use internally, uses this to provide your own inheriting class that adds its own message fieldschat
- Chat instance to manage
-
-
Method Details
-
getMessages
Get the initialized Messages instance.- Returns:
- Messages instance
-