1
mirror of https://github.com/CarmJos/EasyConfiguration.git synced 2026-06-04 10:38:19 +08:00

feat(source): Update sources' original type

This commit is contained in:
2025-02-16 02:04:14 +08:00
parent eff91b0496
commit 96ed604cd9
13 changed files with 160 additions and 39 deletions
@@ -96,22 +96,12 @@ public class MemorySection implements ConfigureSection {
return section == this ? data.get(path) : section.get(childPath(path));
}
@Override
public boolean isList(@NotNull String path) {
return get(path) instanceof List<?>;
}
@Override
public @Nullable List<?> getList(@NotNull String path) {
Object val = get(path);
return (val instanceof List<?>) ? (List<?>) val : null;
}
@Override
public boolean isSection(@NotNull String path) {
return get(path) instanceof ConfigureSection;
}
@Override
public @Nullable ConfigureSection getSection(@NotNull String path) {
Object val = get(path);