aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/sowgro/npehero/levelapi/Difficulty.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/sowgro/npehero/levelapi/Difficulty.java')
-rwxr-xr-xsrc/main/java/net/sowgro/npehero/levelapi/Difficulty.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/net/sowgro/npehero/levelapi/Difficulty.java b/src/main/java/net/sowgro/npehero/levelapi/Difficulty.java
index c21ecf1..27f025a 100755
--- a/src/main/java/net/sowgro/npehero/levelapi/Difficulty.java
+++ b/src/main/java/net/sowgro/npehero/levelapi/Difficulty.java
@@ -50,6 +50,7 @@ public class Difficulty implements Comparable<Difficulty>
if (!jsonFile.exists()) {
return;
}
+ @SuppressWarnings("unchecked")
Map<String, Object> data = jsonParser.fromJson(new FileReader(jsonFile), Map.class);
if (data == null) {
data = new HashMap<>();
@@ -85,6 +86,7 @@ public class Difficulty implements Comparable<Difficulty>
if (!jsonFile.exists() && !jsonFile.createNewFile()) {
throw new IOException("Could not create file " + jsonFile.getAbsolutePath());
}
+ @SuppressWarnings("unchecked")
Map<String, Object> data = jsonParser.fromJson(new FileReader(jsonFile), Map.class); // start with previous values
if (data == null) {
data = new HashMap<>();