1
mirror of https://github.com/CarmJos/EasyConfiguration.git synced 2026-06-04 18:48:20 +08:00

feat(section): Add more section functions

This commit is contained in:
2025-04-17 23:55:15 +08:00
parent 47a1981002
commit a2de3303e8
2 changed files with 40 additions and 20 deletions
@@ -74,7 +74,7 @@ public class ImmutableSection implements ConfigureSection {
@Override
public @Nullable ConfigureSection getSection(@NotNull String path) {
ConfigureSection get = raw().getSection(path);
if (get != null && !(get instanceof ImmutableSection)) {
if (!(get instanceof ImmutableSection)) {
return new ImmutableSection(this, get);
}
return get;
@@ -350,6 +350,11 @@ public class ImmutableSection implements ConfigureSection {
return raw().getCharList(path);
}
@Override
public @NotNull List<ConfigureSection> getSectionList(@NotNull String path) {
return raw().getSectionList(path);
}
@Override
public <T, C extends Collection<T>> @NotNull C getCollection(@NotNull String path, @NotNull Supplier<C> constructor, @NotNull DataFunction<Object, T> parser) {
return raw().getCollection(path, constructor, parser);