aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/SlayingTaskLevel.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/SlayingTaskLevel.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/SlayingTaskLevel.java
index 1e33c3ea..3a64b257 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/SlayingTaskLevel.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/SlayingTaskLevel.java
@@ -139,9 +139,12 @@ public class SlayingTaskLevel extends GuiTaskLevel {
int kuudraBossCollection = 0;
if (object.has("nether_island_player_data")) {
- JsonObject jsonObject = object.getAsJsonObject("nether_island_player_data").getAsJsonObject(
- "kuudra_completed_tiers");
- for (Map.Entry<String, JsonElement> stringJsonElementEntry : jsonObject.entrySet()) {
+ JsonObject kuudraCompletedTiers = Utils.getElementOrDefault(
+ selectedProfile.getProfileJson(),
+ "nether_island_player_data.kuudra_completed_tiers",
+ new JsonObject()
+ ).getAsJsonObject();
+ for (Map.Entry<String, JsonElement> stringJsonElementEntry : kuudraCompletedTiers.entrySet()) {
String key = stringJsonElementEntry.getKey();
int value = stringJsonElementEntry.getValue().getAsInt();