Class ConfigurationOptions

java.lang.Object
org.simpleyaml.configuration.ConfigurationOptions
Direct Known Subclasses:
MemoryConfigurationOptions

public class ConfigurationOptions extends Object
Various settings for controlling the input and output of a Configuration
Author:
Bukkit
See Also:
  • Constructor Details

    • ConfigurationOptions

      protected ConfigurationOptions(Configuration configuration)
  • Method Details

    • configuration

      public Configuration configuration()
      Returns the Configuration that this object is responsible for.
      Returns:
      Parent configuration
    • 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
    • pathSeparator

      public ConfigurationOptions 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
    • 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 true.

      Returns:
      Whether or not defaults are directly copied
    • copyDefaults

      public ConfigurationOptions 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 true.

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

      public int indent()
      Gets how much spaces should be used to indent each line.
      Returns:
      How much to indent by
    • indent

      public ConfigurationOptions indent(int value)
      Sets how much spaces should be used to indent each line.
      Parameters:
      value - New indent
      Returns:
      This object, for chaining
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object