Class ConfigurationOptions
- Direct Known Subclasses:
MemoryConfigurationOptions
public class ConfigurationOptions
extends java.lang.Object
Configuration-
Field Summary
Fields Modifier and Type Field Description private Configurationconfigurationprivate booleancopyDefaultsprivate charpathSeparator -
Constructor Summary
Constructors Modifier Constructor Description protectedConfigurationOptions(@NotNull Configuration configuration) -
Method Summary
Modifier and Type Method Description @NotNull Configurationconfiguration()Returns theConfigurationthat this object is responsible for.booleancopyDefaults()Checks if theConfigurationshould copy values from its defaultConfigurationdirectly.@NotNull ConfigurationOptionscopyDefaults(boolean value)Sets if theConfigurationshould copy values from its defaultConfigurationdirectly.charpathSeparator()Gets the char that will be used to separateConfigurationSections@NotNull ConfigurationOptionspathSeparator(char value)Sets the char that will be used to separateConfigurationSectionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
pathSeparator
private char pathSeparator -
copyDefaults
private boolean copyDefaults -
configuration
-
-
Constructor Details
-
ConfigurationOptions
-
-
Method Details
-
configuration
Returns theConfigurationthat this object is responsible for.- Returns:
- Parent configuration
-
pathSeparator
public char pathSeparator()Gets the char that will be used to separateConfigurationSectionsThis value does not affect how the
Configurationis stored, only in how you access the data. The default value is '.'.- Returns:
- Path separator
-
pathSeparator
Sets the char that will be used to separateConfigurationSectionsThis value does not affect how the
Configurationis 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 theConfigurationshould copy values from its defaultConfigurationdirectly.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(java.lang.String)will always return the same value asConfigurationSection.isSet(java.lang.String). The default value is false.- Returns:
- Whether or not defaults are directly copied
-
copyDefaults
Sets if theConfigurationshould copy values from its defaultConfigurationdirectly.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(java.lang.String)will always return the same value asConfigurationSection.isSet(java.lang.String). The default value is false.- Parameters:
value- Whether or not defaults are directly copied- Returns:
- This object, for chaining
-