public class FileConfigurationOptions extends MemoryConfigurationOptions
FileConfiguration.
Synchronized with the commit on 20-December-2021.| Modifier | Constructor and Description |
|---|---|
protected |
FileConfigurationOptions(@NotNull MemoryConfiguration configuration)
Constructs a new set of
FileConfigurationOptions. |
| Modifier and Type | Method and Description |
|---|---|
@NotNull FileConfiguration |
configuration()
Deprecated.
|
@NotNull FileConfigurationOptions |
copyDefaults(boolean copyDefaults)
Deprecated.
|
boolean |
copyHeader()
Deprecated.
This method only exists for backwards compatibility. Please
use
getParseComments()
instead. |
@NotNull FileConfigurationOptions |
copyHeader(boolean parseComments)
Deprecated.
This method only exists for backwards compatibility. Please
use
setParseComments(boolean)
instead. |
@NotNull FileConfiguration |
getConfiguration()
Gets the
Configuration that this ConfigurationOptions
controls. |
@NotNull List<String> |
getFooter()
Gets the footer that will be applied to the bottom of the saved output.
|
@NotNull List<String> |
getHeader()
Gets the header that will be applied to the top of the saved output.
|
boolean |
getParseComments()
Gets whether the comments in a
FileConfiguration should be loaded
and saved. |
@NotNull String |
header()
Deprecated.
This method exists for backwards compatibility. Please use
getHeader() instead. |
@NotNull FileConfigurationOptions |
header(@Nullable String header)
Deprecated.
This method exists for backwards compatibility. Please use
setHeader(List) instead. |
@NotNull FileConfigurationOptions |
pathSeparator(char pathSeparator)
Deprecated.
|
@NotNull FileConfigurationOptions |
setCopyDefaults(boolean copyDefaults)
Sets if the
Configuration should copy values from its default
Configuration directly. |
@NotNull FileConfigurationOptions |
setFooter(@Nullable List<String> footer)
Sets the footer that will be applied to the bottom of the saved output.
|
@NotNull FileConfigurationOptions |
setHeader(@Nullable List<String> header)
Sets the header that will be applied to the top of the saved output.
|
@NotNull FileConfigurationOptions |
setParseComments(boolean parseComments)
Sets whether the comments in a
FileConfiguration should be loaded
and saved. |
@NotNull FileConfigurationOptions |
setPathSeparator(char pathSeparator)
Sets the
char that will be used to separate
ConfigurationSections. |
copyDefaults, getCopyDefaults, getPathSeparator, pathSeparatorprotected FileConfigurationOptions(@NotNull
@NotNull MemoryConfiguration configuration)
FileConfigurationOptions.configuration - The MemoryConfiguration to create the
FileConfigurationOptions for.MemoryConfigurationOptions(MemoryConfiguration)@NotNull public @NotNull FileConfiguration getConfiguration()
Configuration that this ConfigurationOptions
controls.getConfiguration in class MemoryConfigurationOptionsConfiguration that this ConfigurationOptions
controls.@Deprecated @NotNull public @NotNull FileConfiguration configuration()
Please use ConfigurationOptions.getConfiguration() instead; it
provides the same functionality.
configuration in class MemoryConfigurationOptionsConfiguration that this ConfigurationOptions
controls.ConfigurationOptions.getConfiguration()@NotNull public @NotNull FileConfigurationOptions 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 MemoryConfigurationOptionspathSeparator - The char used to separate
ConfigurationSections.ConfigurationOptions, for chaining.@Deprecated @NotNull public @NotNull FileConfigurationOptions pathSeparator(char pathSeparator)
Please use ConfigurationOptions.setPathSeparator(char) instead;
it provides the same functionality.
pathSeparator in class MemoryConfigurationOptionspathSeparator - The char used to separate
ConfigurationSections.ConfigurationOptions, for chaining.ConfigurationOptions.setPathSeparator(char)@NotNull public @NotNull FileConfigurationOptions 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 MemoryConfigurationOptionscopyDefaults - true if the default values should be copied,
false otherwise.ConfigurationOptions, for chaining.@Deprecated @NotNull public @NotNull FileConfigurationOptions copyDefaults(boolean copyDefaults)
Please use ConfigurationOptions.setCopyDefaults(boolean) instead;
it provides the same functionality.
copyDefaults in class MemoryConfigurationOptionscopyDefaults - true if the default values should be copied,
false otherwise.ConfigurationOptions, for chaining.ConfigurationOptions.setCopyDefaults(boolean)@NotNull public final @NotNull List<String> getHeader()
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, and 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.
List, where every entry
represents one line.@Deprecated @NotNull public final @NotNull String header()
getHeader() instead.
Please use getHeader() instead.
List, where every entry
represents one line.getHeader()@NotNull public @NotNull FileConfigurationOptions 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.
header - The new header, where every entry represents one line.FileConfigurationOptions, for chaining.@Deprecated @NotNull public @NotNull FileConfigurationOptions header(@Nullable @Nullable String header)
setHeader(List) instead.
Please use setHeader(List) instead.
header - The new header, where every entry represents one line.FileConfigurationOptions, for chaining.setHeader(List)@NotNull public final @NotNull List<String> getFooter()
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.
@NotNull public @NotNull FileConfigurationOptions 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.
footer - The new footer, where every entry represents one line.FileConfigurationOptions, for chaining.public final boolean getParseComments()
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 (getHeader() returns an empty
List), then the header specified in this Configuration
will be used.
The default value is true.
true if the comments are to be parsed, false
otherwise.@Deprecated public final boolean copyHeader()
getParseComments()
instead.
Please use getParseComments() instead;
it provides the same functionality.
true if the comments are to be parsed, false
otherwise.getParseComments()@NotNull public @NotNull FileConfigurationOptions 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 (getHeader() returns an empty
List), then the header specified in this Configuration
will be used.
The default value is true.
parseComments - true if the comments are to be parsed,
false otherwise.FileConfigurationOptions, for chaining.@Deprecated @NotNull public @NotNull FileConfigurationOptions copyHeader(boolean parseComments)
setParseComments(boolean)
instead.
Please use setParseComments(boolean)
instead; it provides the same functionality.
parseComments - true if the comments are to be parsed,
false otherwise.FileConfigurationOptions, for chaining.setParseComments(boolean)Copyright © 2022 BSPF Systems, LLC. All rights reserved.