Config additions

This commit is contained in:
Auxilor
2021-12-03 16:13:37 +00:00
parent 2f7603409e
commit e219b2f33c
2 changed files with 12 additions and 2 deletions

View File

@@ -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();

View File

@@ -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 {