类 MemorySection
- 所有已实现的接口:
ConfigurationSection
- 直接已知子类:
MemoryConfiguration
ConfigurationSection.-
字段概要
字段 -
构造器概要
构造器限定符构造器说明protected创建一个空的 MemorySection, 用作根Configuration节.protectedMemorySection(@NotNull ConfigurationSection parent, @NotNull String path) 创建一个具有指定父节和路径的空 MemorySection. -
方法概要
修饰符和类型方法说明voidaddDefault(@NotNull String path, @Nullable Object value) 给指定路径添加一个缺省值.boolean检查ConfigurationSection是否包含指定路径.boolean检查此ConfigurationSection是否包含给定路径.createPath(@NotNull ConfigurationSection section, @Nullable String key) 从根Configuration创建到给定ConfigurationSection的完整路径.createPath(@NotNull ConfigurationSection section, @Nullable String key, @Nullable ConfigurationSection relativeTo) 从给定的相对节创建到给定ConfigurationSection的相对路径.createSection(@NotNull String path) 在指定路径创建一个空的ConfigurationSection.createSection(@NotNull String path, @NotNull Map<?, ?> map) 在指定路径创建一个带有指定值的ConfigurationSection.在指定路径获取一个 Object 类型的值.在指定路径上获取一个 Object , 如果无法获取, 则直接返回默认值.booleangetBoolean(@NotNull String path) 在指定路径获取一个 boolean 类型的值.booleangetBoolean(@NotNull String path, boolean def) 在指定路径上获取一个 boolean, 如果无法获取, 则直接返回默认值.getBooleanList(@NotNull String path) 在指定路径获取一个 List<Boolean>.getByteList(@NotNull String path) 在指定路径获取一个 List<Byte>.getCharacterList(@NotNull String path) 在指定路径获取一个 List<Character>.在指定路径获取一个Color类型的值.在指定路径上获取一个Color, 如果无法获取, 则直接返回指定默认值.getComments(@NotNull String path) 按路径获取请求的注释列表.获取一个ConfigurationSection,它是一个以指定路径作为基点的新的配置项,修改会同步.从根Configuration中获取这个ConfigurationSection的路径.getDefault(@NotNull String path) double在指定路径获取一个 double 类型的值.double在指定路径上获取一个double, 如果无法获取, 则直接返回默认值.getDoubleList(@NotNull String path) 在指定路径获取一个 List<Double>.getFloatList(@NotNull String path) 在指定路径获取一个 List<Float>.getInlineComments(@NotNull String path) 按路径获取请求的行内注释列表.int在指定路径获取一个 int 类型的值.int在指定路径上获取一个 int, 如果无法获取, 则直接返回默认值.getIntegerList(@NotNull String path) 在指定路径获取一个 List<Integer>.getItemStack(@NotNull String path) 在指定路径获取一个ItemStack类型的值.getItemStack(@NotNull String path, @Nullable ItemStack def) 在指定路径上获取一个ItemStack, 如果无法获取, 则直接返回默认值.getKeys(boolean deep) 获取此配置文件的键集合.在指定路径获取一个 List 类型的值.在指定路径上获取一个 List, 如果无法获取, 则直接返回默认值.getLocation(@NotNull String path) 在指定路径获取一个 Location 类型的值.getLocation(@NotNull String path, @Nullable Location def) 在指定路径获取一个Location, 如果未找到则返回默认值.long在指定路径获取一个 long 类型的值.long在指定路径上获取一个 long, 如果无法获取, 则直接返回默认值.getLongList(@NotNull String path) 在指定路径获取一个 List<Long>.getMapList(@NotNull String path) 在指定路径获取一个 List<Maps>.getName()获取此ConfigurationSection在路径中的单独名称.<T> T在给定路径获取请求的对象.<T> T在给定路径获取请求的对象, 如果未找到则返回默认值.getOfflinePlayer(@NotNull String path) 在指定路径获取一个OfflinePlayer类型的值.getOfflinePlayer(@NotNull String path, @Nullable OfflinePlayer def) 在指定路径上获取一个OfflinePlayer, 如果无法获取, 则直接返回默认值.获取直接包含此ConfigurationSection的父ConfigurationSection.getRoot()获取包含此ConfigurationSection的根Configuration.<T extends ConfigurationSerializable>
TgetSerializable(@NotNull String path, @NotNull Class<T> clazz) 在给定路径获取请求的ConfigurationSerializable对象.<T extends ConfigurationSerializable>
TgetSerializable(@NotNull String path, @NotNull Class<T> clazz, T def) 在给定路径获取请求的ConfigurationSerializable对象, 如果未找到则返回默认值.getShortList(@NotNull String path) 在指定路径获取一个 List<Short>.在指定路径获取一个 String 类型的值.在指定路径上获取一个 String , 如果无法获取, 则直接返回默认值.getStringList(@NotNull String path) 在指定路径获取一个 List<String>.getValues(boolean deep) 获取这个配置文件的键值集合.在指定路径获取一个Vector类型的值.在指定路径上获取一个Vector, 如果无法获取, 则直接返回默认值.boolean检查指定路径是否是 boolean.boolean检查指定路径是否是Color.boolean检查指定路径是否是ConfigurationSection.boolean检查指定路径是否是 double.boolean检查指定路径是否是 int.booleanisItemStack(@NotNull String path) 检查指定路径是否是ItemStack.boolean检查指定路径是否是 List.booleanisLocation(@NotNull String path) 检查指定路径是否是 Location.boolean检查指定路径是否是 long.booleanisOfflinePlayer(@NotNull String path) 检查指定路径是否是OfflinePlayer.protected booleanisPrimitiveWrapper(@Nullable Object input) boolean检查指定路径是否是 Set.boolean检查指定路径是否是 String.boolean检查指定路径是否是Vector.protected voidmapChildrenKeys(@NotNull Set<String> output, @NotNull ConfigurationSection section, boolean deep) protected voidmapChildrenValues(@NotNull Map<String, Object> output, @NotNull ConfigurationSection section, boolean deep) void将指定路径设置为给定值.void在指定路径设置注释列表.void在指定路径设置行内注释列表.toString()
-
字段详细资料
-
map
-
-
构造器详细资料
-
MemorySection
protected MemorySection()创建一个空的 MemorySection, 用作根Configuration节.注意: 如果自身不是
Configuration实例, 调用此构造函数将抛出异常!原文: Creates an empty MemorySection for use as a root
Configurationsection.Note that calling this without being yourself a
Configurationwill throw an exception!- 抛出:
IllegalStateException- 如果此实例不是Configuration根则抛出此异常.
-
MemorySection
protected MemorySection(@NotNull @NotNull ConfigurationSection parent, @NotNull @NotNull String path) 创建一个具有指定父节和路径的空 MemorySection.原文: Creates an empty MemorySection with the specified parent and path.
- 参数:
parent- 包含此节的父节.path- 可以通过根Configuration访问此节的路径.- 抛出:
IllegalArgumentException- 如果 parent 或 path 为 null, 或者 parent 不包含根 Configuration 则抛出此异常.
-
-
方法详细资料
-
getKeys
从接口复制的说明:ConfigurationSection获取此配置文件的键集合.如果为 true, 则返回包括所有的能访问到的键的集合. 类似于获取硬盘中第一层目录还是遍历全部子目录.
例如:
top1. Second1
top1. Second2
top2. Second1
top2. Second2
原文: Gets a set containing all keys in this section.
If deep is set to true, then this will contain all the keys within any child
ConfigurationSections (and their children, etc). These will be in a valid path notation for you to use.If deep is set to false, then this will contain only the keys of any direct children, and not their own children.
- 指定者:
getKeys在接口中ConfigurationSection- 参数:
deep- 获取全部键, 或者仅仅获取表层键.- 返回:
- 将返回一个 set, 装载着符合要求的键.
-
getValues
从接口复制的说明:ConfigurationSection获取这个配置文件的键值集合.如果为 true, 则返回包括所有的能访问到的键和值的集合. 类似于获取硬盘中第一层目录还是遍历全部子目录.
如果为 false, 则返回表层的键和值的集合.
原文: Gets a Map containing all keys and their values for this section.
If deep is set to true, then this will contain all the keys and values within any child
ConfigurationSections (and their children, etc). These keys will be in a valid path notation for you to use.If deep is set to false, then this will contain only the keys and values of any direct children, and not their own children.
- 指定者:
getValues在接口中ConfigurationSection- 参数:
deep- 获取全部键值集合(true), 或者仅仅获取表层键值集合(false).- 返回:
- 返回一个 Map.
-
contains
从接口复制的说明:ConfigurationSection检查ConfigurationSection是否包含指定路径.如果这个路径不存在, 但已指定一个缺省值, 也将返回 true.
原文: Checks if this
ConfigurationSectioncontains the given path.If the value for the requested path does not exist but a default value has been specified, this will return true.
- 指定者:
contains在接口中ConfigurationSection- 参数:
path- 要检查的路径- 返回:
- 如果此部分包含请求的路径,可以通过默认的或者被设置.
-
contains
从接口复制的说明:ConfigurationSection检查此ConfigurationSection是否包含给定路径.如果请求路径的值不存在, 但布尔参数为 true 且该路径存在默认值, 则返回 true.
如果布尔参数为 false, 则只有在指定路径存在已设置的值时才返回 true.
原文: Checks if this
ConfigurationSectioncontains the given path.If the value for the requested path does not exist, the boolean parameter of true has been specified, a default value for the path exists, this will return true.
If a boolean parameter of false has been specified, true will only be returned if there is a set value for the specified path.
- 指定者:
contains在接口中ConfigurationSection- 参数:
path- 要检查是否存在的路径.ignoreDefault- 是否忽略指定路径的默认值.- 返回:
- 如果此节包含请求的路径, 或者存在默认值且此方法的布尔参数为 true, 则返回 true.
-
isSet
从接口复制的说明:ConfigurationSection检查指定路径是否是 Set.如果路径存在, 但不是 Set, 则返回 false.
如果路径不存在, 则返回 false.
如果路径不存在, 但在缺省列表中存在该路径, 则在缺省列表中重复匹配该规则, 直到返回一个适当的值.
原文: Checks if this
ConfigurationSectionhas a value set for the given path.If the value for the requested path does not exist but a default value has been specified, this will still return false.
- 指定者:
isSet在接口中ConfigurationSection- 参数:
path- 检查路径.- 返回:
- True if this section contains the requested path, regardless of having a default.
-
getCurrentPath
从接口复制的说明:ConfigurationSection从根Configuration中获取这个ConfigurationSection的路径.如果这个
ConfigurationSection已经是根目录, 将返回一个空字符串.如果这个
ConfigurationSection不属于任何根目录, 将返回 null.如果要获取这个
ConfigurationSection名字,也就是路径中的最后一节, 你应该使用ConfigurationSection.getName()来获取.原文: Gets the path of this
ConfigurationSectionfrom its rootConfiguration.For any
Configurationthemselves, this will return an empty string.If the section is no longer contained within its root for any reason, such as being replaced with a different value, this may return null.
To retrieve the single name of this section, that is, the final part of the path returned by this method, you may use
ConfigurationSection.getName().- 指定者:
getCurrentPath在接口中ConfigurationSection- 返回:
- 这个片段相对于其根的路径.
-
getName
从接口复制的说明:ConfigurationSection获取此ConfigurationSection在路径中的单独名称.除非该节已成为孤立节点, 否则这始终是
ConfigurationSection.getCurrentPath()的最后一部分.原文: Gets the name of this individual
ConfigurationSection, in the path.This will always be the final part of
ConfigurationSection.getCurrentPath(), unless the section is orphaned.- 指定者:
getName在接口中ConfigurationSection- 返回:
- 此节的名称.
-
getRoot
从接口复制的说明:ConfigurationSection获取包含此ConfigurationSection的根Configuration.对于任何
Configuration自身, 将返回其自身的对象.如果该节因任何原因不再被包含在其根中 (例如被替换为不同的值), 可能返回 null.
原文: Gets the root
Configurationthat contains thisConfigurationSectionFor any
Configurationthemselves, this will return its own object.If the section is no longer contained within its root for any reason, such as being replaced with a different value, this may return null.
- 指定者:
getRoot在接口中ConfigurationSection- 返回:
- 包含此节的根配置.
-
getParent
从接口复制的说明:ConfigurationSection获取直接包含此ConfigurationSection的父ConfigurationSection.对于任何
Configuration自身, 将返回 null.如果该节因任何原因不再被包含在其父节中 (例如被替换为不同的值), 可能返回 null.
原文: Gets the parent
ConfigurationSectionthat directly contains thisConfigurationSection.For any
Configurationthemselves, this will return null.If the section is no longer contained within its parent for any reason, such as being replaced with a different value, this may return null.
- 指定者:
getParent在接口中ConfigurationSection- 返回:
- 包含此节的父节.
-
addDefault
从接口复制的说明:ConfigurationSection给指定路径添加一个缺省值.如果缺省值
Configuration没有被提供, 则自动创建一个新的.如果值为 null, 表示从缺省值
Configuration中删除这个路径上的默认值如果
ConfigurationSection.getDefaultSection()返回的值为 null, 则建立一个新的原文: Sets the default value in the root at the given path as provided.
If no source
Configurationwas provided as a default collection, then a newMemoryConfigurationwill be created to hold the new default value.If value is null, the value will be removed from the default Configuration source.
If the value as returned by
ConfigurationSection.getDefaultSection()is null, then this will create a new section at the path, replacing anything that may have existed there previously.- 指定者:
addDefault在接口中ConfigurationSection- 参数:
path- 要设置缺省值的路径.value- 要设置的值.
-
getDefaultSection
从接口复制的说明:ConfigurationSection从ConfigurationSection.getRoot()中定义的默认Configuration获取等效的ConfigurationSection.如果根不包含默认值, 或默认值不包含此路径的值, 或此路径的值不是
ConfigurationSection, 则返回 null.原文: Gets the equivalent
ConfigurationSectionfrom the defaultConfigurationdefined inConfigurationSection.getRoot().If the root contains no defaults, or the defaults doesn't contain a value for this path, or the value at this path is not a
ConfigurationSectionthen this will return null.- 指定者:
getDefaultSection在接口中ConfigurationSection- 返回:
- 根配置中的等效节.
-
set
从接口复制的说明:ConfigurationSection将指定路径设置为给定值.如果值为 null, 则删除该条目. 无论新值是什么, 任何已存在的条目都将被替换.
某些实现可能对你能存储的内容有限制. 详见它们各自的 javadoc. 没有实现应该允许你存储
Configuration或ConfigurationSection, 请使用ConfigurationSection.createSection(java.lang.String)来创建.原文: Sets the specified path to the given value.
If value is null, the entry will be removed. Any existing entry will be replaced, regardless of what the new value is.
Some implementations may have limitations on what you may store. See their individual javadocs for details. No implementations should allow you to store
Configurations orConfigurationSections, please useConfigurationSection.createSection(java.lang.String)for that.- 指定者:
set在接口中ConfigurationSection- 参数:
path- 要设置的对象路径.value- 要设置的新值.
-
get
从接口复制的说明:ConfigurationSection在指定路径获取一个 Object 类型的值.如果这个 Object 不存在, 但已指定一个缺省值, 这将返回缺省值.
如果这个 Object 不存在, 并且没有指定缺省值, 则返回 null.
原文: Gets the requested Object by path.
If the Object does not exist but a default value has been specified, this will return the default value. If the Object does not exist and no default value was specified, this will return null.
- 指定者:
get在接口中ConfigurationSection- 参数:
path- 获取 Object 的路径.- 返回:
- 返回一个 Object.
-
get
@Contract("_, !null -> !null") @Nullable public @Nullable Object get(@NotNull @NotNull String path, @Nullable @Nullable Object def) 从接口复制的说明:ConfigurationSection在指定路径上获取一个 Object , 如果无法获取, 则直接返回默认值.如果 Object 无法在
Configuration中被获取, 则不会尝试去缺省列表中去寻找, 而是直接返回指定的默认值.原文: Gets the requested Object by path, returning a default value if not found.
If the Object does not exist then the specified default value will returned regardless of if a default has been identified in the root
Configuration.- 指定者:
get在接口中ConfigurationSection- 参数:
path- 获取 Object 的路径.def- 当指定路径上没有值, 返回这个值.- 返回:
- 返回一个Object.
-
createSection
从接口复制的说明:ConfigurationSection在指定路径创建一个空的ConfigurationSection.此路径上之前设置的任何值都将被覆盖. 如果之前的值本身是一个
ConfigurationSection, 它将成为孤立节点.原文: Creates an empty
ConfigurationSectionat the specified path.Any value that was previously set at this path will be overwritten. If the previous value was itself a
ConfigurationSection, it will be orphaned.- 指定者:
createSection在接口中ConfigurationSection- 参数:
path- 要创建节的路径.- 返回:
- 新创建的节.
-
createSection
@NotNull public @NotNull ConfigurationSection createSection(@NotNull @NotNull String path, @NotNull @NotNull Map<?, ?> map) 从接口复制的说明:ConfigurationSection在指定路径创建一个带有指定值的ConfigurationSection.此路径上之前设置的任何值都将被覆盖. 如果之前的值本身是一个
ConfigurationSection, 它将成为孤立节点.原文: Creates a
ConfigurationSectionat the specified path, with specified values.Any value that was previously set at this path will be overwritten. If the previous value was itself a
ConfigurationSection, it will be orphaned.- 指定者:
createSection在接口中ConfigurationSection- 参数:
path- 要创建节的路径.map- 要使用的值.- 返回:
- 新创建的节.
-
getString
从接口复制的说明:ConfigurationSection在指定路径获取一个 String 类型的值.如果这个 String 不存在, 但已指定一个缺省值, 这将返回缺省值.
如果这个 String 不存在, 并且没有指定缺省值, 则返回 null.
原文: Gets the requested String by path.
If the String does not exist but a default value has been specified, this will return the default value. If the String does not exist and no default value was specified, this will return null.
- 指定者:
getString在接口中ConfigurationSection- 参数:
path- 获取 String 的路径.- 返回:
- 返回一个 String.
-
getString
@Contract("_, !null -> !null") @Nullable public @Nullable String getString(@NotNull @NotNull String path, @Nullable @Nullable String def) 从接口复制的说明:ConfigurationSection在指定路径上获取一个 String , 如果无法获取, 则直接返回默认值.如果无法获取到一个 String, 将不会尝试去缺省列表中去获取, 而是直接返回指定的默认值.
原文: Gets the requested String by path, returning a default value if not found.
If the String does not exist then the specified default value will returned regardless of if a default has been identified in the root
Configuration.- 指定者:
getString在接口中ConfigurationSection- 参数:
path- 获取 String 的路径.def- 当指定路径上没有值, 或者不是 String 类型时, 返回这个值.- 返回:
- 返回一个 String.
-
isString
从接口复制的说明:ConfigurationSection检查指定路径是否是 String.如果路径存在, 但不是 String, 则返回 false.
如果路径不存在, 则返回 false.
如果路径不存在, 但在缺省列表中存在该路径, 则在缺省列表中重复匹配该规则, 直到返回一个适当的值.
原文: Checks if the specified path is a String.
If the path exists but is not a String, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a String and return appropriately.
- 指定者:
isString在接口中ConfigurationSection- 参数:
path- 检查指定路径是否是 String.- 返回:
- 指定路径是否是 String.
-
getInt
从接口复制的说明:ConfigurationSection在指定路径获取一个 int 类型的值.如果这个 int 不存在, 但已指定一个缺省值, 这将返回缺省值.
如果这个 int 不存在, 并且没有指定缺省值, 则返回 0 .
原文: Gets the requested int by path.
If the int does not exist but a default value has been specified, this will return the default value. If the int does not exist and no default value was specified, this will return 0.
- 指定者:
getInt在接口中ConfigurationSection- 参数:
path- 获取 int 的路径.- 返回:
- 返回一个 int.
-
getInt
从接口复制的说明:ConfigurationSection在指定路径上获取一个 int, 如果无法获取, 则直接返回默认值.如果无法获取到一个 int, 将不会尝试去缺省列表中去获取, 而是直接返回指定的默认值.
原文: Gets the requested int by path, returning a default value if not found.
If the int does not exist then the specified default value will returned regardless of if a default has been identified in the root
Configuration.- 指定者:
getInt在接口中ConfigurationSection- 参数:
path- 获取 int 的路径.def- 当指定路径上没有值, 或者不是 int 类型时, 返回这个值.- 返回:
- 返回一个 int.
-
isInt
从接口复制的说明:ConfigurationSection检查指定路径是否是 int.如果路径存在, 但不是 int, 则返回 false.
如果路径不存在, 则返回 false.
如果路径不存在, 但在缺省列表中存在该路径, 则在缺省列表中重复匹配该规则, 直到返回一个适当的值.
原文: Checks if the specified path is a int.
If the path exists but is not a int, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a int and return appropriately.
- 指定者:
isInt在接口中ConfigurationSection- 参数:
path- 检查指定路径是否是 int.- 返回:
- 指定路径是否是 int.
-
getBoolean
从接口复制的说明:ConfigurationSection在指定路径获取一个 boolean 类型的值.如果这个 boolean 不存在, 但已指定一个缺省值, 这将返回缺省值.
如果这个 boolean 不存在, 并且没有指定缺省值, 则返回 false.
原文: Gets the requested boolean by path.
If the boolean does not exist but a default value has been specified, this will return the default value. If the boolean does not exist and no default value was specified, this will return false.
- 指定者:
getBoolean在接口中ConfigurationSection- 参数:
path- 获取 boolean 的路径.- 返回:
- 返回一个 boolean.
-
getBoolean
从接口复制的说明:ConfigurationSection在指定路径上获取一个 boolean, 如果无法获取, 则直接返回默认值.如果无法获取到一个 boolean, 将不会尝试去缺省列表中去获取, 而是直接返回指定的默认值.
原文: Gets the requested boolean by path, returning a default value if not found.
If the boolean does not exist then the specified default value will returned regardless of if a default has been identified in the root
Configuration.- 指定者:
getBoolean在接口中ConfigurationSection- 参数:
path- 获取 boolean 的路径.def- 当指定路径上没有值, 或者不是 boolean 类型时, 返回这个值.- 返回:
- 返回一个 boolean.
-
isBoolean
从接口复制的说明:ConfigurationSection检查指定路径是否是 boolean.如果路径存在, 但不是 boolean, 则返回 false.
如果路径不存在, 则返回 false.
如果路径不存在, 但在缺省列表中存在该路径, 则在缺省列表中重复匹配该规则, 直到返回一个适当的值.
原文: Checks if the specified path is a boolean.
If the path exists but is not a boolean, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a boolean and return appropriately.
- 指定者:
isBoolean在接口中ConfigurationSection- 参数:
path- 检查指定路径是否是 boolean.- 返回:
- 指定路径是否是 boolean.
-
getDouble
从接口复制的说明:ConfigurationSection在指定路径获取一个 double 类型的值.如果这个 double 不存在, 但已指定一个缺省值, 这将返回缺省值.
如果这个 double 不存在, 并且没有指定缺省值, 则返回0.
原文: Gets the requested double by path.
If the double does not exist but a default value has been specified, this will return the default value. If the double does not exist and no default value was specified, this will return 0.
- 指定者:
getDouble在接口中ConfigurationSection- 参数:
path- 获取double的路径.- 返回:
- 返回一个double.
-
getDouble
从接口复制的说明:ConfigurationSection在指定路径上获取一个double, 如果无法获取, 则直接返回默认值.如果无法获取到一个 double, 将不会尝试去缺省列表中去获取, 而是直接返回指定的默认值.
原文: Gets the requested double by path, returning a default value if not found.
If the double does not exist then the specified default value will returned regardless of if a default has been identified in the root
Configuration.- 指定者:
getDouble在接口中ConfigurationSection- 参数:
path- 获取 double 的路径.def- 当指定路径上没有值, 或者不是 double 类型时, 返回这个值.- 返回:
- 返回一个 double.
-
isDouble
从接口复制的说明:ConfigurationSection检查指定路径是否是 double.如果路径存在, 但不是 double, 则返回 false.
如果路径不存在, 则返回 false.
如果路径不存在, 但在缺省列表中存在该路径, 则在缺省列表中重复匹配该规则, 直到返回一个适当的值.
原文: Checks if the specified path is a double.
If the path exists but is not a double, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a double and return appropriately.
- 指定者:
isDouble在接口中ConfigurationSection- 参数:
path- 检查指定路径是否是 double.- 返回:
- 指定路径是否是 double.
-
getLong
从接口复制的说明:ConfigurationSection在指定路径获取一个 long 类型的值.如果这个 long 不存在, 但已指定一个缺省值, 这将返回缺省值.
如果这个 long 不存在, 并且没有指定缺省值, 则返回 0.
原文: Gets the requested long by path.
If the long does not exist but a default value has been specified, this will return the default value. If the long does not exist and no default value was specified, this will return 0.
- 指定者:
getLong在接口中ConfigurationSection- 参数:
path- 获取long的路径.- 返回:
- 返回一个long.
-
getLong
从接口复制的说明:ConfigurationSection在指定路径上获取一个 long, 如果无法获取, 则直接返回默认值.如果无法获取到一个 long, 将不会尝试去缺省列表中去获取, 而是直接返回指定的默认值.
原文: Gets the requested long by path, returning a default value if not found.
If the long does not exist then the specified default value will returned regardless of if a default has been identified in the root
Configuration.- 指定者:
getLong在接口中ConfigurationSection- 参数:
path- 获取 long 的路径.def- 当指定路径上没有值, 或者不是 long 类型时, 返回这个值.- 返回:
- 返回一个 long.
-
isLong
从接口复制的说明:ConfigurationSection检查指定路径是否是 long.如果路径存在, 但不是 long, 则返回 false.
如果路径不存在, 则返回 false.
如果路径不存在, 但在缺省列表中存在该路径, 则在缺省列表中重复匹配该规则, 直到返回一个适当的值.
原文: Checks if the specified path is a long.
If the path exists but is not a long, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a long and return appropriately.
- 指定者:
isLong在接口中ConfigurationSection- 参数:
path- 检查指定路径是否是 long.- 返回:
- 指定路径是否是 long.
-
getList
从接口复制的说明:ConfigurationSection在指定路径获取一个 List 类型的值.如果这个 List 不存在, 但已指定一个缺省值, 这将返回缺省值.
如果这个 List 不存在, 并且没有指定缺省值, 则返回 null.
原文: Gets the requested List by path.
If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return null.
- 指定者:
getList在接口中ConfigurationSection- 参数:
path- 获取 List 的路径.- 返回:
- 返回一个 List.
-
getList
@Contract("_, !null -> !null") @Nullable public @Nullable List<?> getList(@NotNull @NotNull String path, @Nullable @Nullable List<?> def) 从接口复制的说明:ConfigurationSection在指定路径上获取一个 List, 如果无法获取, 则直接返回默认值.如果无法获取到一个 List, 将不会尝试去缺省列表中去获取, 而是直接返回指定的默认值.
原文: Gets the requested List by path, returning a default value if not found.
If the List does not exist then the specified default value will returned regardless of if a default has been identified in the root
Configuration.- 指定者:
getList在接口中ConfigurationSection- 参数:
path- 获取 List 的路径.def- 当指定路径上没有值, 或者不是 List 类型时, 返回这个值.- 返回:
- 返回一个 List.
-
isList
从接口复制的说明:ConfigurationSection检查指定路径是否是 List.如果路径存在, 但不是 List, 则返回 false.
如果路径不存在, 则返回 false.
如果路径不存在, 但在缺省列表中存在该路径, 则在缺省列表中重复匹配该规则, 直到返回一个适当的值.
原文: Checks if the specified path is a List.
If the path exists but is not a List, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a List and return appropriately.
- 指定者:
isList在接口中ConfigurationSection- 参数:
path- 检查指定路径是否是 List.- 返回:
- 指定路径是否是 List.
-
getStringList
从接口复制的说明:ConfigurationSection在指定路径获取一个 List<String>.如果列表不存在,但已指定一个缺省值,这将返回默认值.
如果列表不存在,并且没有指定缺省值,这将返回一个空的列表.
此方法会尽可能的将 List 中所有的项转化为 String, 但是如果值本身不兼容, 将会发生不可预计的状况.
原文: Gets the requested List of String by path.
If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.
This method will attempt to cast any values into a String if possible, but may miss any values out if they are not compatible.
- 指定者:
getStringList在接口中ConfigurationSection- 参数:
path- 要获取 List<String> 的路径.- 返回:
- 返回一个 List<String>.
-
getIntegerList
从接口复制的说明:ConfigurationSection在指定路径获取一个 List<Integer>.如果列表不存在,但已指定一个缺省值,这将返回默认值.
如果列表不存在,并且没有指定缺省值,这将返回一个空的列表.
此方法会尽可能的将 List 中所有的项转化为 Integer, 但是如果值本身不兼容, 将会发生不可预计的状况.
原文: Gets the requested List of Integer by path.
If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.
This method will attempt to cast any values into a Integer if possible, but may miss any values out if they are not compatible.
- 指定者:
getIntegerList在接口中ConfigurationSection- 参数:
path- 要获取 List<Integer> 的路径.- 返回:
- 返回一个 List<Integer>.
-
getBooleanList
从接口复制的说明:ConfigurationSection在指定路径获取一个 List<Boolean>.如果列表不存在,但已指定一个缺省值,这将返回默认值.
如果列表不存在,并且没有指定缺省值,这将返回一个空的列表.
此方法会尽可能的将 List 中所有的项转化为 Boolean, 但是如果值本身不兼容, 将会发生不可预计的状况.
原文: Gets the requested List of Boolean by path.
If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.
This method will attempt to cast any values into a Boolean if possible, but may miss any values out if they are not compatible.
- 指定者:
getBooleanList在接口中ConfigurationSection- 参数:
path- 要获取 List<Boolean> 的路径.- 返回:
- 返回一个 List<Boolean>.
-
getDoubleList
从接口复制的说明:ConfigurationSection在指定路径获取一个 List<Double>.如果列表不存在,但已指定一个缺省值,这将返回默认值.
如果列表不存在,并且没有指定缺省值,这将返回一个空的列表.
此方法会尽可能的将 List 中所有的项转化为 Double, 但是如果值本身不兼容, 将会发生不可预计的状况.
原文: Gets the requested List of Double by path.
If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.
This method will attempt to cast any values into a Double if possible, but may miss any values out if they are not compatible.
- 指定者:
getDoubleList在接口中ConfigurationSection- 参数:
path- 要获取 List<Double>的路径.- 返回:
- 要获取 List<Double>.
-
getFloatList
从接口复制的说明:ConfigurationSection在指定路径获取一个 List<Float>.如果列表不存在,但已指定一个缺省值,这将返回默认值.
如果列表不存在,并且没有指定缺省值,这将返回一个空的列表.
此方法会尽可能的将 List 中所有的项转化为 Float, 但是如果值本身不兼容, 将会发生不可预计的状况.
原文: Gets the requested List of Float by path.
If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.
This method will attempt to cast any values into a Float if possible, but may miss any values out if they are not compatible.
- 指定者:
getFloatList在接口中ConfigurationSection- 参数:
path- 要获取 List<Float>的路径.- 返回:
- 返回一个 List<Float>.
-
getLongList
从接口复制的说明:ConfigurationSection在指定路径获取一个 List<Long>.如果列表不存在,但已指定一个缺省值,这将返回默认值.
如果列表不存在,并且没有指定缺省值,这将返回一个空的列表.
此方法会尽可能的将 List 中所有的项转化为Long, 但是如果值本身不兼容, 将会发生不可预计的状况.
原文: Gets the requested List of Long by path.
If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.
This method will attempt to cast any values into a Long if possible, but may miss any values out if they are not compatible.
- 指定者:
getLongList在接口中ConfigurationSection- 参数:
path- 要获取 List<Long>的路径.- 返回:
- 返回一个 List<Long>.
-
getByteList
从接口复制的说明:ConfigurationSection在指定路径获取一个 List<Byte>.如果列表不存在,但已指定一个缺省值,这将返回默认值.
如果列表不存在,并且没有指定缺省值,这将返回一个空的列表.
此方法会尽可能的将 List 中所有的项转化为 Byte, 但是如果值本身不兼容, 将会发生不可预计的状况.
原文: Gets the requested List of Byte by path.
If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.
This method will attempt to cast any values into a Byte if possible, but may miss any values out if they are not compatible.
- 指定者:
getByteList在接口中ConfigurationSection- 参数:
path- 要获取 List<Byte>的路径.- 返回:
- 返回一个 List<Byte>.
-
getCharacterList
从接口复制的说明:ConfigurationSection在指定路径获取一个 List<Character>.如果列表不存在,但已指定一个缺省值,这将返回默认值.
如果列表不存在,并且没有指定缺省值,这将返回一个空的列表.
此方法会尽可能的将 List 中所有的项转化为 Character, 但是如果值本身不兼容, 将会发生不可预计的状况.
原文: Gets the requested List of Character by path.
If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.
This method will attempt to cast any values into a Character if possible, but may miss any values out if they are not compatible.
- 指定者:
getCharacterList在接口中ConfigurationSection- 参数:
path- 要获取 List<Character>的路径.- 返回:
- 返回一个 List<Character>.
-
getShortList
从接口复制的说明:ConfigurationSection在指定路径获取一个 List<Short>.如果列表不存在,但已指定一个缺省值,这将返回默认值.
如果列表不存在,并且没有指定缺省值,这将返回一个空的列表.
此方法会尽可能的将 List 中所有的项转化为 Short, 但是如果值本身不兼容, 将会发生不可预计的状况.
原文: Gets the requested List of Short by path.
If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.
This method will attempt to cast any values into a Short if possible, but may miss any values out if they are not compatible.
- 指定者:
getShortList在接口中ConfigurationSection- 参数:
path- 要获取 List<Short>的路径.- 返回:
- 返回一个 List<Short>.
-
getMapList
从接口复制的说明:ConfigurationSection在指定路径获取一个 List<Maps>.如果列表不存在,但已指定一个缺省值,这将返回默认值.
如果列表不存在,并且没有指定缺省值,这将返回一个空的列表.
此方法会尽可能的将 List 中所有的项转化为 Map, 但是如果值本身不兼容, 将会发生不可预计的状况.
原文: Gets the requested List of Maps by path.
If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.
This method will attempt to cast any values into a Map if possible, but may miss any values out if they are not compatible.
- 指定者:
getMapList在接口中ConfigurationSection- 参数:
path- 要获取 List<Maps>的路径.- 返回:
- 返回一个 List<Maps>.
-
getObject
从接口复制的说明:ConfigurationSection在给定路径获取请求的对象.如果对象不存在, 但已指定默认值, 则返回默认值. 如果对象不存在且未指定默认值, 则返回 null.
注意: 例如 #getObject(path, String.class) 与
#getString(path)不等价, 因为#getString(path)会内部将所有对象转换为字符串. 然而, #getObject(path, Boolean.class) 与#getBoolean(path)等价.原文: Gets the requested object at the given path. If the Object does not exist but a default value has been specified, this will return the default value. If the Object does not exist and no default value was specified, this will return null. Note: For example #getObject(path, String.class) is not equivalent to
#getString(path)because#getString(path)converts internally all Objects to Strings. However, #getObject(path, Boolean.class) is equivalent to#getBoolean(path)for example.- 指定者:
getObject在接口中ConfigurationSection- 类型参数:
T- 请求对象的类型.- 参数:
path- 对象的路径.clazz- 请求对象的类型.- 返回:
- 请求的对象.
-
getObject
@Contract("_, _, !null -> !null") @Nullable public <T> T getObject(@NotNull @NotNull String path, @NotNull @NotNull Class<T> clazz, @Nullable T def) 从接口复制的说明:ConfigurationSection在给定路径获取请求的对象, 如果未找到则返回默认值.如果对象不存在, 则返回指定的默认值, 无论根
Configuration中是否已识别默认值.注意: 例如 #getObject(path, String.class, def) 与
#getString(path, def)不等价, 因为#getString(path, def)会内部将所有对象转换为字符串. 然而, #getObject(path, Boolean.class, def) 与#getBoolean(path, def)等价.原文: Gets the requested object at the given path, returning a default value if not found If the Object does not exist then the specified default value will returned regardless of if a default has been identified in the root
Configuration. Note: For example #getObject(path, String.class, def) is not equivalent to#getString(path, def)because#getString(path, def)converts internally all Objects to Strings. However, #getObject(path, Boolean.class, def) is equivalent to#getBoolean(path, def)for example.- 指定者:
getObject在接口中ConfigurationSection- 类型参数:
T- 请求对象的类型.- 参数:
path- 对象的路径.clazz- 请求对象的类型.def- 如果对象不在该路径上时返回的默认对象.- 返回:
- 请求的对象.
-
getSerializable
@Nullable public <T extends ConfigurationSerializable> T getSerializable(@NotNull @NotNull String path, @NotNull @NotNull Class<T> clazz) 从接口复制的说明:ConfigurationSection在给定路径获取请求的ConfigurationSerializable对象.如果对象不存在, 但已指定默认值, 则返回默认值. 如果对象不存在且未指定默认值, 则返回 null.
原文: Gets the requested
ConfigurationSerializableobject at the given path. If the Object does not exist but a default value has been specified, this will return the default value. If the Object does not exist and no default value was specified, this will return null.- 指定者:
getSerializable在接口中ConfigurationSection- 类型参数:
T-ConfigurationSerializable的类型.- 参数:
path- 对象的路径.clazz-ConfigurationSerializable的类型.- 返回:
- 请求的
ConfigurationSerializable对象.
-
getSerializable
@Contract("_, _, !null -> !null") @Nullable public <T extends ConfigurationSerializable> T getSerializable(@NotNull @NotNull String path, @NotNull @NotNull Class<T> clazz, @Nullable T def) 从接口复制的说明:ConfigurationSection在给定路径获取请求的ConfigurationSerializable对象, 如果未找到则返回默认值.如果对象不存在, 则返回指定的默认值, 无论根
Configuration中是否已识别默认值.原文: Gets the requested
ConfigurationSerializableobject at the given path, returning a default value if not found If the Object does not exist then the specified default value will returned regardless of if a default has been identified in the rootConfiguration.- 指定者:
getSerializable在接口中ConfigurationSection- 类型参数:
T-ConfigurationSerializable的类型.- 参数:
path- 对象的路径.clazz-ConfigurationSerializable的类型.def- 如果对象不在该路径上时返回的默认对象.- 返回:
- 请求的
ConfigurationSerializable对象.
-
getVector
从接口复制的说明:ConfigurationSection在指定路径获取一个Vector类型的值.如果这个Vector不存在, 但已指定一个缺省值, 这将返回缺省值. Vector. 如果这个Vector不存在, 并且没有指定缺省值, 则返回null.
原文: Gets the requested Vector by path.
If the Vector does not exist but a default value has been specified, this will return the default value. If the Vector does not exist and no default value was specified, this will return null.
- 指定者:
getVector在接口中ConfigurationSection- 参数:
path- 获取Vector的路径.- 返回:
- 返回一个Vector.
-
getVector
@Contract("_, !null -> !null") @Nullable public @Nullable Vector getVector(@NotNull @NotNull String path, @Nullable @Nullable Vector def) 从接口复制的说明:ConfigurationSection在指定路径上获取一个Vector, 如果无法获取, 则直接返回默认值.如果无法获取到一个
Vector, 将不会尝试去缺省列表中去获取, 而是直接返回指定的默认值.原文: Gets the requested
Vectorby path, returning a default value if not found.If the Vector does not exist then the specified default value will returned regardless of if a default has been identified in the root
Configuration.- 指定者:
getVector在接口中ConfigurationSection- 参数:
path- 获取Vector的路径.def- 当指定路径上没有值, 或者不是Vector类型时, 返回这个值.- 返回:
- 返回一个
Vectorr.
-
isVector
从接口复制的说明:ConfigurationSection检查指定路径是否是Vector.如果路径存在, 但不是
Vector, 则返回 false.如果路径不存在, 则返回 false.
如果路径不存在, 但在缺省列表中存在该路径, 则在缺省列表中重复匹配该规则, 直到返回一个适当的值.
原文: Checks if the specified path is a Vector.
If the path exists but is not a Vector, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a Vector and return appropriately.
- 指定者:
isVector在接口中ConfigurationSection- 参数:
path- 检查指定路径是否是Vector.- 返回:
- 指定路径是否是
Vector.
-
getOfflinePlayer
从接口复制的说明:ConfigurationSection在指定路径获取一个OfflinePlayer类型的值.如果这个
OfflinePlayer不存在, 但已指定一个缺省值, 这将返回缺省值.如果这个
OfflinePlayer不存在, 并且没有指定缺省值, 则返回 null.原文: Gets the requested OfflinePlayer by path.
If the OfflinePlayer does not exist but a default value has been specified, this will return the default value. If the OfflinePlayer does not exist and no default value was specified, this will return null.
- 指定者:
getOfflinePlayer在接口中ConfigurationSection- 参数:
path- 获取OfflinePlayer的路径.- 返回:
- 返回一个
OfflinePlayer.
-
getOfflinePlayer
@Contract("_, !null -> !null") @Nullable public @Nullable OfflinePlayer getOfflinePlayer(@NotNull @NotNull String path, @Nullable @Nullable OfflinePlayer def) 从接口复制的说明:ConfigurationSection在指定路径上获取一个OfflinePlayer, 如果无法获取, 则直接返回默认值.如果无法获取到一个
OfflinePlayer, 将不会尝试去缺省列表中去获取, 而是直接返回指定的默认值.原文: Gets the requested
OfflinePlayerby path, returning a default value if not found.If the OfflinePlayer does not exist then the specified default value will returned regardless of if a default has been identified in the root
Configuration.- 指定者:
getOfflinePlayer在接口中ConfigurationSection- 参数:
path- 获取OfflinePlayer的路径.def- 当指定路径上没有值, 或者不是OfflinePlayer类型时, 返回这个值.- 返回:
- 返回一个
OfflinePlayer.
-
isOfflinePlayer
从接口复制的说明:ConfigurationSection检查指定路径是否是OfflinePlayer.如果路径存在, 但不是
OfflinePlayer, 则返回 false.如果路径不存在, 则返回 false.
如果路径不存在, 但在缺省列表中存在该路径, 则在缺省列表中重复匹配该规则, 直到返回一个适当的值.
原文: Checks if the specified path is a OfflinePlayer.
If the path exists but is not a OfflinePlayer, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a OfflinePlayer and return appropriately.
- 指定者:
isOfflinePlayer在接口中ConfigurationSection- 参数:
path- 检查指定路径是否是OfflinePlayer.- 返回:
- 指定路径是否是
OfflinePlayer.
-
getItemStack
从接口复制的说明:ConfigurationSection在指定路径获取一个ItemStack类型的值.如果这个
ItemStack不存在, 但已指定一个缺省值, 这将返回缺省值.如果这个
ItemStack不存在, 并且没有指定缺省值, 则返回 null.原文: Gets the requested ItemStack by path.
If the ItemStack does not exist but a default value has been specified, this will return the default value. If the ItemStack does not exist and no default value was specified, this will return null.
- 指定者:
getItemStack在接口中ConfigurationSection- 参数:
path- 获取ItemStack的路径.- 返回:
- 返回一个
ItemStack.
-
getItemStack
@Contract("_, !null -> !null") @Nullable public @Nullable ItemStack getItemStack(@NotNull @NotNull String path, @Nullable @Nullable ItemStack def) 从接口复制的说明:ConfigurationSection在指定路径上获取一个ItemStack, 如果无法获取, 则直接返回默认值.如果无法获取到一个
ItemStack, 将不会尝试去缺省列表中去获取, 而是直接返回指定的默认值.原文: Gets the requested
ItemStackby path, returning a default value if not found.If the ItemStack does not exist then the specified default value will returned regardless of if a default has been identified in the root
Configuration.- 指定者:
getItemStack在接口中ConfigurationSection- 参数:
path- 获取ItemStack的路径.def- 当指定路径上没有值, 或者不是ItemStack类型时, 返回这个值.- 返回:
- 返回一个ItemStack.
-
isItemStack
从接口复制的说明:ConfigurationSection检查指定路径是否是ItemStack.如果路径存在, 但不是
ItemStack, 则返回 false.如果路径不存在, 则返回 false.
如果路径不存在, 但在缺省列表中存在该路径, 则在缺省列表中重复匹配该规则, 直到返回一个适当的值.
原文: Checks if the specified path is a ItemStack.
If the path exists but is not a ItemStack, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a ItemStack and return appropriately.
- 指定者:
isItemStack在接口中ConfigurationSection- 参数:
path- 检查指定路径是否是ItemStack.- 返回:
- 指定路径是否是
ItemStack.
-
getColor
从接口复制的说明:ConfigurationSection在指定路径获取一个Color类型的值.如果这个Color不存在, 但已指定一个缺省值, 这将返回缺省值. Color.
如果这个Color不存在, 并且没有指定缺省值, 则返回null.
原文: Gets the requested Color by path.
If the Color does not exist but a default value has been specified, this will return the default value. If the Color does not exist and no default value was specified, this will return null.
- 指定者:
getColor在接口中ConfigurationSection- 参数:
path- 获取Color的路径.- 返回:
- 返回一个Color.
-
getColor
@Contract("_, !null -> !null") @Nullable public @Nullable Color getColor(@NotNull @NotNull String path, @Nullable @Nullable Color def) 从接口复制的说明:ConfigurationSection在指定路径上获取一个Color, 如果无法获取, 则直接返回指定默认值.如果无法获取到一个
Color, 将不会尝试去缺省列表中去获取, 而是直接返回指定的默认值.原文: Gets the requested
Colorby path, returning a default value if not found.If the Color does not exist then the specified default value will returned regardless of if a default has been identified in the root
Configuration.- 指定者:
getColor在接口中ConfigurationSection- 参数:
path- 获取Color的路径.def- 当指定路径上没有值, 或者不是Color类型时, 返回这个值.- 返回:
- 返回一个
Color.
-
isColor
从接口复制的说明:ConfigurationSection检查指定路径是否是Color.如果路径存在, 但不是
Color, 则返回 false.如果路径不存在, 则返回 false.
如果路径不存在, 但在缺省列表中存在该路径, 则在缺省列表中重复匹配该规则, 直到返回一个适当的值.
原文: Checks if the specified path is a Color.
If the path exists but is not a Color, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a Color and return appropriately.
- 指定者:
isColor在接口中ConfigurationSection- 参数:
path- 检查指定路径是否是Color.- 返回:
- 指定路径是否是
Color.
-
getLocation
从接口复制的说明:ConfigurationSection在指定路径获取一个 Location 类型的值.如果这个 Location 不存在, 但已指定一个缺省值, 这将返回缺省值.
如果这个 Location 不存在, 并且没有指定缺省值, 则返回 null.
原文: Gets the requested Location by path.
If the Location does not exist but a default value has been specified, this will return the default value. If the Location does not exist and no default value was specified, this will return null.
- 指定者:
getLocation在接口中ConfigurationSection- 参数:
path- 获取 Location 的路径.- 返回:
- 请求的 Location.
-
getLocation
@Contract("_, !null -> !null") @Nullable public @Nullable Location getLocation(@NotNull @NotNull String path, @Nullable @Nullable Location def) 从接口复制的说明:ConfigurationSection在指定路径获取一个Location, 如果未找到则返回默认值.如果 Location 不存在, 则返回指定的默认值, 无论根
Configuration中是否已识别默认值.原文: Gets the requested
Locationby path, returning a default value if not found.If the Location does not exist then the specified default value will returned regardless of if a default has been identified in the root
Configuration.- 指定者:
getLocation在接口中ConfigurationSection- 参数:
path- 获取 Location 的路径.def- 如果路径未找到或不是 Location 时返回的默认值.- 返回:
- 请求的 Location.
-
isLocation
从接口复制的说明:ConfigurationSection检查指定路径是否是 Location.如果路径存在但不是 Location, 则返回 false. 如果路径不存在, 则返回 false. 如果路径不存在但已指定默认值, 则检查该默认值是否是 Location 并相应返回.
原文: Checks if the specified path is a Location.
If the path exists but is not a Location, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a Location and return appropriately.
- 指定者:
isLocation在接口中ConfigurationSection- 参数:
path- 要检查的 Location 路径.- 返回:
- 指定路径是否是 Location.
-
getConfigurationSection
@Nullable public @Nullable ConfigurationSection getConfigurationSection(@NotNull @NotNull String path) 从接口复制的说明:ConfigurationSection获取一个ConfigurationSection,它是一个以指定路径作为基点的新的配置项,修改会同步.如果这个
ConfigurationSection不存在, 但已指定一个缺省值, 这将返回缺省值.如果这个
ConfigurationSection不存在, 并且没有指定缺省值, 则返回 null.更人性化的解释: 现在有一个配置文件如下
root: branch1: branch1_1: something branch1_2: something branch2: branch2_1: something branch3_2: something如果调用ConfigurationSection.getConfigurationSection(java.lang.String)参数为("branch1") ,则会返回branch1: branch1_1: something branch1_2: something并且修改会同步原文: Gets the requested ConfigurationSection by path.
If the ConfigurationSection does not exist but a default value has been specified, this will return the default value. If the ConfigurationSection does not exist and no default value was specified, this will return null.
- 指定者:
getConfigurationSection在接口中ConfigurationSection- 参数:
path- 获取ConfigurationSection的路径.- 返回:
- 返回一个
ConfigurationSection.
-
isConfigurationSection
从接口复制的说明:ConfigurationSection检查指定路径是否是ConfigurationSection.如果路径存在, 但不是
ConfigurationSection, 则返回 false.如果路径不存在, 则返回 false.
如果路径不存在, 但在缺省列表中存在该路径, 则在缺省列表中重复匹配该规则, 直到返回一个适当的值.
原文: Checks if the specified path is a ConfigurationSection.
If the path exists but is not a ConfigurationSection, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a ConfigurationSection and return appropriately.
- 指定者:
isConfigurationSection在接口中ConfigurationSection- 参数:
path- 检查指定路径是否是ConfigurationSection.- 返回:
- 指定路径是否是
ConfigurationSection.
-
isPrimitiveWrapper
-
getDefault
-
mapChildrenKeys
-
mapChildrenValues
-
createPath
@NotNull public static @NotNull String createPath(@NotNull @NotNull ConfigurationSection section, @Nullable @Nullable String key) 从根Configuration创建到给定ConfigurationSection的完整路径.此方法适用于任何
ConfigurationSection, 不仅限于MemorySection.原文: Creates a full path to the given
ConfigurationSectionfrom its rootConfiguration.You may use this method for any given
ConfigurationSection, not onlyMemorySection.- 参数:
section- 要为其创建路径的节.key- 指定节的名称.- 返回:
- 该节从根开始的完整路径.
-
createPath
@NotNull public static @NotNull String createPath(@NotNull @NotNull ConfigurationSection section, @Nullable @Nullable String key, @Nullable @Nullable ConfigurationSection relativeTo) 从给定的相对节创建到给定ConfigurationSection的相对路径.此方法适用于任何
ConfigurationSection, 不仅限于MemorySection.原文: Creates a relative path to the given
ConfigurationSectionfrom the given relative section.You may use this method for any given
ConfigurationSection, not onlyMemorySection.- 参数:
section- 要为其创建路径的节.key- 指定节的名称.relativeTo- 创建路径所相对的节.- 返回:
- 该节从根开始的完整路径.
-
getComments
从接口复制的说明:ConfigurationSection按路径获取请求的注释列表.如果不存在注释, 将返回一个空列表. null 条目代表一个空行, 空字符串代表一个空的注释行.
原文: Gets the requested comment list by path.
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.
- 指定者:
getComments在接口中ConfigurationSection- 参数:
path- 要获取注释的路径.- 返回:
- 一个不可修改的注释列表, 每个条目代表一行.
-
getInlineComments
从接口复制的说明:ConfigurationSection按路径获取请求的行内注释列表.如果不存在注释, 将返回一个空列表. null 条目代表一个空行, 空字符串代表一个空的注释行.
原文: Gets the requested inline comment list by path.
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.
- 指定者:
getInlineComments在接口中ConfigurationSection- 参数:
path- 要获取注释的路径.- 返回:
- 一个不可修改的注释列表, 每个条目代表一行.
-
setComments
从接口复制的说明:ConfigurationSection在指定路径设置注释列表.如果值为 null, 则删除注释. null 条目代表一个空行, 空字符串条目代表一个空的注释行. 如果路径不存在, 则不设置任何注释. 无论新注释是什么, 所有已有的注释都将被替换.
某些实现在持久化方面可能有限制. 详见它们各自的 javadoc.
原文: Sets the comment list at the specified path.
If value is null, the comments will be removed. A null entry is an empty line and an empty String entry is an empty comment line. If the path does not exist, no comments will be set. Any existing comments will be replaced, regardless of what the new comments are.
Some implementations may have limitations on what persists. See their individual javadocs for details.
- 指定者:
setComments在接口中ConfigurationSection- 参数:
path- 要设置注释的路径.comments- 要在该路径设置的新注释, 每个条目代表一行.
-
setInlineComments
public void setInlineComments(@NotNull @NotNull String path, @Nullable @Nullable List<String> comments) 从接口复制的说明:ConfigurationSection在指定路径设置行内注释列表.如果值为 null, 则删除注释. null 条目代表一个空行, 空字符串条目代表一个空的注释行. 如果路径不存在, 则不设置任何注释. 无论新注释是什么, 所有已有的注释都将被替换.
某些实现在持久化方面可能有限制. 详见它们各自的 javadoc.
原文: Sets the inline comment list at the specified path.
If value is null, the comments will be removed. A null entry is an empty line and an empty String entry is an empty comment line. If the path does not exist, no comment will be set. Any existing comments will be replaced, regardless of what the new comments are.
Some implementations may have limitations on what persists. See their individual javadocs for details.
- 指定者:
setInlineComments在接口中ConfigurationSection- 参数:
path- 要设置注释的路径.comments- 要在该路径设置的新注释, 每个条目代表一行.
-
toString
-