forked from SteamWar/SteamWar
Improve YMLWrapper
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user