mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-18 07:14:49 +01:00
Implement item use (energy potions)
- Selectors don't work yet
This commit is contained in:
@@ -77,6 +77,10 @@ public class JsonUtils {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static <T1, T2> Map<T1, T2> decodeMap(String jsonData, Class<T1> keyType, Class<T2> valueType) {
|
||||
return gson.fromJson(jsonData, TypeToken.getParameterized(LinkedHashMap.class, keyType, valueType).getType());
|
||||
}
|
||||
|
||||
public static <T> T loadToClass(InputStreamReader fileReader, Class<T> classType) throws IOException {
|
||||
return gson.fromJson(fileReader, classType);
|
||||
|
||||
Reference in New Issue
Block a user