Custom launch items
@@ -252,15 +252,19 @@ public class Settings{
modified = true;
}
- public <T> T getJson(String name, Class<T> type, Prov<T> def){
+ public <T> T getJson(String name, Class<T> type, Class elementType, Prov<T> def){
try{
byteInputStream.setBytes(getBytes(name));
- return json.readValue(type, ureader.parse(byteInputStream));
+ return json.readValue(type, elementType, ureader.parse(byteInputStream));
}catch(Throwable e){
return def.get();
}
}
+ public <T> T getJson(String name, Class<T> type, Prov<T> def){
+ return getJson(name, type, null, def);
+ }
+
public float getFloat(String name, float def){
return (float)values.get(name, def);
}
