Improve YMLWrapper

This commit is contained in:
2025-10-25 22:08:58 +02:00
parent e6dea72024
commit 4405d9c25d
3 changed files with 19 additions and 30 deletions
@@ -83,9 +83,15 @@ public abstract class YMLWrapper<M, ST, W> {
return materialMapper.apply(getString(path, defaultValue).toUpperCase());
}
public abstract List<String> getStringList(String path);
public abstract <T> List<T> get(String path, Function<Object, List<T>> mapper);
public abstract List<Integer> getIntList(String path);
public List<String> getStringList(String path) {
return get(path, o -> (List<String>) o);
}
public List<Integer> getIntList(String path) {
return get(path, o -> (List<Integer>) o);
}
public final List<ST> getSchematicTypeList(String path) {
List<String> list = getStringList(path);