Config additions
This commit is contained in:
@@ -173,6 +173,16 @@ public abstract class ConfigWrapper<T extends Config> implements Config {
|
||||
return handle.getDoublesOrNull(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<? extends Config> getSubsections(@NotNull final String path) {
|
||||
return handle.getSubsections(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable List<? extends Config> getSubsectionsOrNull(@NotNull final String path) {
|
||||
return handle.getSubsectionsOrNull(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Config clone() {
|
||||
return handle.clone();
|
||||
|
||||
@@ -263,7 +263,7 @@ open class EcoYamlConfigWrapper<T : ConfigurationSection> : Config {
|
||||
}
|
||||
}
|
||||
|
||||
override fun getSubsections(path: String): MutableList<Config> {
|
||||
override fun getSubsections(path: String): MutableList<out Config> {
|
||||
return if (cache.containsKey(path)) {
|
||||
(cache[path] as MutableList<Config>).toMutableList()
|
||||
} else {
|
||||
@@ -278,7 +278,7 @@ open class EcoYamlConfigWrapper<T : ConfigurationSection> : Config {
|
||||
}
|
||||
}
|
||||
|
||||
override fun getSubsectionsOrNull(path: String): MutableList<Config>? {
|
||||
override fun getSubsectionsOrNull(path: String): MutableList<out Config>? {
|
||||
return if (has(path)) {
|
||||
getSubsections(path)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user