public final class YamlConfigurationOptions extends FileConfigurationOptions
YamlConfiguration.
Synchronized with the commit on 13-March-2019.| Modifier and Type | Method and Description |
|---|---|
@NotNull YamlConfiguration |
configuration()
Deprecated.
|
@NotNull YamlConfigurationOptions |
copyDefaults(boolean copyDefaults)
Deprecated.
|
@NotNull YamlConfigurationOptions |
copyHeader(boolean copyHeader)
Deprecated.
|
@NotNull YamlConfiguration |
getConfiguration()
Gets the
Configuration that this ConfigurationOptions
controls. |
int |
getIndent()
Gets the number of spaces used to represent an indent.
|
int |
getWidth()
Gets how long a line can be before it gets split.
|
@NotNull YamlConfigurationOptions |
header(@Nullable String header)
Deprecated.
|
int |
indent()
Deprecated.
This method exists for backwards compatibility. Please use
getIndent() instead. |
@NotNull YamlConfigurationOptions |
indent(int indent)
Deprecated.
This method exists for backwards compatibility. Please use
setIndent(int) instead. |
@NotNull YamlConfigurationOptions |
pathSeparator(char pathSeparator)
Deprecated.
|
@NotNull YamlConfigurationOptions |
setCopyDefaults(boolean copyDefaults)
Sets if the
Configuration should copy values from its default
Configuration directly. |
@NotNull YamlConfigurationOptions |
setFooter(@Nullable List<String> footer)
Sets the footer that will be applied to the bottom of the saved output.
|
@NotNull YamlConfigurationOptions |
setHeader(@Nullable List<String> header)
Sets the header that will be applied to the top of the saved output.
|
@NotNull YamlConfigurationOptions |
setIndent(int indent)
Sets the number of spaces used to represent an indent.
|
@NotNull YamlConfigurationOptions |
setParseComments(boolean parseComments)
Sets whether the comments in a
FileConfiguration should be loaded
and saved. |
@NotNull YamlConfigurationOptions |
setPathSeparator(char pathSeparator)
Sets the
char that will be used to separate
ConfigurationSections. |
@NotNull YamlConfigurationOptions |
setWidth(int width)
Sets how long a line can be before it gets split.
|
copyHeader, getFooter, getHeader, getParseComments, headercopyDefaults, getCopyDefaults, getPathSeparator, pathSeparator@NotNull public @NotNull YamlConfiguration getConfiguration()
Configuration that this ConfigurationOptions
controls.getConfiguration in class FileConfigurationOptionsConfiguration that this ConfigurationOptions
controls.@Deprecated @NotNull public @NotNull YamlConfiguration configuration()
Please use ConfigurationOptions.getConfiguration() instead; it
provides the same functionality.
configuration in class FileConfigurationOptionsConfiguration that this ConfigurationOptions
controls.ConfigurationOptions.getConfiguration()@NotNull public @NotNull YamlConfigurationOptions setPathSeparator(char pathSeparator)
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 ..
setPathSeparator in class FileConfigurationOptionspathSeparator - The char used to separate
ConfigurationSections.ConfigurationOptions, for chaining.@Deprecated @NotNull public @NotNull YamlConfigurationOptions pathSeparator(char pathSeparator)
Please use ConfigurationOptions.setPathSeparator(char) instead;
it provides the same functionality.
pathSeparator in class FileConfigurationOptionspathSeparator - The char used to separate
ConfigurationSections.ConfigurationOptions, for chaining.ConfigurationOptions.setPathSeparator(char)@NotNull public @NotNull YamlConfigurationOptions setCopyDefaults(boolean copyDefaults)
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.
setCopyDefaults in class FileConfigurationOptionscopyDefaults - true if the default values should be copied,
false otherwise.ConfigurationOptions, for chaining.@Deprecated @NotNull public @NotNull YamlConfigurationOptions copyDefaults(boolean copyDefaults)
Please use ConfigurationOptions.setCopyDefaults(boolean) instead;
it provides the same functionality.
copyDefaults in class FileConfigurationOptionscopyDefaults - true if the default values should be copied,
false otherwise.ConfigurationOptions, for chaining.ConfigurationOptions.setCopyDefaults(boolean)@NotNull public @NotNull YamlConfigurationOptions setHeader(@Nullable @Nullable List<String> header)
This header will be commented out and applied directly at the top of
the generated output of the FileConfiguration. It is not
required to include a newline at the end of the header as it will
automatically be applied, but you may include one if you wish for extra
spacing.
If no comments exist, an empty List will be returned. A
null entry represents an empty line, and an empty String
represents an empty comment line.
The default header is no header.
setHeader in class FileConfigurationOptionsheader - The new header, where every entry represents one line.FileConfigurationOptions, for chaining.@Deprecated @NotNull public @NotNull YamlConfigurationOptions header(@Nullable @Nullable String header)
Please use FileConfigurationOptions.setHeader(List) instead.
header in class FileConfigurationOptionsheader - The new header, where every entry represents one line.FileConfigurationOptions, for chaining.FileConfigurationOptions.setHeader(List)@NotNull public @NotNull YamlConfigurationOptions setFooter(@Nullable @Nullable List<String> footer)
This footer will be commented out and applied directly at the bottom of
the generated output of the FileConfiguration. It is not required
to include a newline at the beginning of the footer as it will
automatically be applied, but you may include one if you wish for extra
spacing.
If no comments exist, an empty List will be returned. A null
entry represents an empty line and an empty String represents an
empty comment line.
The default footer is no footer.
setFooter in class FileConfigurationOptionsfooter - The new footer, where every entry represents one line.FileConfigurationOptions, for chaining.@NotNull public @NotNull YamlConfigurationOptions setParseComments(boolean parseComments)
FileConfiguration should be loaded
and saved.
If this is true, and if a default FileConfiguration is
passed to Configuration.setDefaults(Configuration), then upon
saving, the default comments will be parsed from the passed default
FileConfiguration, instead of the ones provided in here.
If no default is set on the Configuration, or the default is not
a FileConfiguration, or that Configuration has no
comments (FileConfigurationOptions.getHeader() returns an empty
List), then the header specified in this Configuration
will be used.
The default value is true.
setParseComments in class FileConfigurationOptionsparseComments - true if the comments are to be parsed,
false otherwise.FileConfigurationOptions, for chaining.@Deprecated @NotNull public @NotNull YamlConfigurationOptions copyHeader(boolean copyHeader)
Please use FileConfigurationOptions.setParseComments(boolean)
instead; it provides the same functionality.
copyHeader in class FileConfigurationOptionscopyHeader - true if the comments are to be parsed,
false otherwise.FileConfigurationOptions, for chaining.FileConfigurationOptions.setParseComments(boolean)public int getIndent()
The minimum value this may be is 2, and the maximum is 9.
The default value is 2.
@Deprecated public int indent()
getIndent() instead.
Please use getIndent() instead; it
provides the same functionality.
getIndent()@NotNull public @NotNull YamlConfigurationOptions setIndent(int indent) throws IllegalArgumentException
The minimum value this may be is 2, and the maximum is 9.
The default value is 2.
indent - The number of spaces used to represent an indent.YamlConfigurationOptions, for chaining.IllegalArgumentException - If the given value is less than 2 or
greater than 9.@Deprecated @NotNull public @NotNull YamlConfigurationOptions indent(int indent) throws IllegalArgumentException
setIndent(int) instead.
Please use setIndent(int) instead; it provides the same functionality.
indent - The number of spaces used to represent an indent.YamlConfigurationOptions, for chaining.IllegalArgumentException - If the given value is less than 2 or
greater than 9.setIndent(int)public int getWidth()
The minimum value this may be is 8, and the maximum is 1000.
The default value is 80.
@NotNull public @NotNull YamlConfigurationOptions setWidth(int width)
The minimum value this may be is 8, and the maximum is 1000.
The default value is 80.
width - The number of characters a line can be before it gets split.YamlConfigurationOptions, for chaining.IllegalArgumentException - If the given value is less than 8 or
greater than 1000.Copyright © 2022 BSPF Systems, LLC. All rights reserved.