Class Configuration


public class Configuration extends AbstractFileAttributeConfiguration
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.

  • Constructor Details

    • Configuration

      public Configuration(org.bukkit.plugin.Plugin plugin, Messages messages)
      Configuration helper constructor. Intended to be used with a dependency injector.
      Parameters:
      plugin - Plugin initializing the helper
      messages - Messages instance to manage, uses this to provide your own inheriting class that adds its own message fields
  • Method Details

    • setChat

      public void setChat(Chat chat)
      Set chat instance to be managed.
      Parameters:
      chat - Chat instance to manage
    • getMessages

      public Messages getMessages()
      Get the initialized Messages instance.
      Returns:
      Messages instance