diff options
author | jani270 <69345714+jani270@users.noreply.github.com> | 2023-11-25 14:03:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-26 00:03:16 +1100 |
commit | b82c11e867f923ddd309775394a6a23ef701e09c (patch) | |
tree | c4184ef77e9667194619fac3da017c9e2a77216b /src/main/java/io | |
parent | fc03e99d9e48e473567f879a8b54125ecc793191 (diff) | |
download | NotEnoughUpdates-b82c11e867f923ddd309775394a6a23ef701e09c.tar.gz NotEnoughUpdates-b82c11e867f923ddd309775394a6a23ef701e09c.tar.bz2 NotEnoughUpdates-b82c11e867f923ddd309775394a6a23ef701e09c.zip |
Hopefully fixed 2 kuudra crashes (#950)
Diffstat (limited to 'src/main/java/io')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java index a752f522..4053b987 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java @@ -160,6 +160,17 @@ public class CrimsonIslePage extends GuiProfileViewerPage { JsonObject kuudraCompletedTiers = data.getAsJsonObject("kuudra_completed_tiers"); + if (kuudraCompletedTiers == null) { + Utils.renderAlignedString( + EnumChatFormatting.RED + "No kuudra stats found!", + " ", + guiLeft + 15, + guiTop + 101, + 130 + ); + return; + } + RenderHelper.enableGUIStandardItemLighting(); for (int i = 0; i < 5; i++) { @@ -301,7 +312,7 @@ public class CrimsonIslePage extends GuiProfileViewerPage { JsonObject lastMatriarchAttempt = data.getAsJsonObject("matriarch"); - if (!lastMatriarchAttempt.entrySet().isEmpty()) { + if (lastMatriarchAttempt != null && !lastMatriarchAttempt.entrySet().isEmpty()) { Utils.renderAlignedString( EnumChatFormatting.GOLD + "Heavy Pearls Acquired: ", EnumChatFormatting.WHITE + lastMatriarchAttempt.get("pearls_collected").getAsString(), |