Class MemoryConfigurationOptions

java.lang.Object
me.confuser.banmanager.common.configuration.MemoryConfigurationOptions
Direct Known Subclasses:
FileConfigurationOptions

public class MemoryConfigurationOptions extends Object
Various settings for controlling the input and output of a MemoryConfiguration.
  • Constructor Details

    • MemoryConfigurationOptions

      protected MemoryConfigurationOptions(MemoryConfiguration configuration)
  • Method Details

    • configuration

      public MemoryConfiguration configuration()
      Returns the Configuration that this object is responsible for.
      Returns:
      Parent configuration
    • copyDefaults

      public MemoryConfigurationOptions copyDefaults(boolean value)
      Sets if the Configuration should copy values from its default Configuration directly.

      If this is true, all values in the default Configuration will be directly copied, making it impossible to distinguish between values that were set and values that are provided by default. As a result, ConfigurationSection.contains(String) will always return the same value as ConfigurationSection.isSet(String). The default value is false.

      Parameters:
      value - Whether or not defaults are directly copied
      Returns:
      This object, for chaining
    • pathSeparator

      public MemoryConfigurationOptions pathSeparator(char value)
      Sets the char that will be used to separate ConfigurationSections.

      This value does not affect how the Configuration is stored, only in how you access the data. The default value is '.'.

      Parameters:
      value - Path separator
      Returns:
      This object, for chaining
    • pathSeparator

      public char pathSeparator()
      Gets the char that will be used to separate ConfigurationSections.

      This value does not affect how the Configuration is stored, only in how you access the data. The default value is '.'.

      Returns:
      Path separator
    • copyDefaults

      public boolean copyDefaults()
      Checks if the Configuration should copy values from its default Configuration directly.

      If this is true, all values in the default Configuration will be directly copied, making it impossible to distinguish between values that were set and values that are provided by default. As a result, ConfigurationSection.contains(String) will always return the same value as ConfigurationSection.isSet(String). The default value is false.

      Returns:
      Whether or not defaults are directly copied