diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2024-09-05 22:27:14 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2024-09-05 22:27:14 -0400 |
commit | a645b476202bd5b44ab5c22253a70269409b5674 (patch) | |
tree | 39a45622e6b9e8325a7bf13f626b902e7fed0a65 /src/main/java/net/sowgro/npehero/levelapi/Difficulty.java | |
parent | d685d397573c43194fede9b2bbd3aee76d2cd9f8 (diff) | |
download | NPEhero-a645b476202bd5b44ab5c22253a70269409b5674.tar.gz NPEhero-a645b476202bd5b44ab5c22253a70269409b5674.tar.bz2 NPEhero-a645b476202bd5b44ab5c22253a70269409b5674.zip |
Add gui scale and other fixes
- add gui scaling and options in settings
- song with endTime of 0 will now properly get time from song length
- suppress unchecked warnings in levelapi
Diffstat (limited to 'src/main/java/net/sowgro/npehero/levelapi/Difficulty.java')
-rwxr-xr-x | src/main/java/net/sowgro/npehero/levelapi/Difficulty.java | 2 |
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<>(); |