diff options
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/profileviewer/SkyblockProfiles.java')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/SkyblockProfiles.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/SkyblockProfiles.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/SkyblockProfiles.java index 61872980..c16d8df0 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/SkyblockProfiles.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/SkyblockProfiles.java @@ -100,6 +100,8 @@ public class SkyblockProfiles { private long soopyNetworthLeaderboardPosition = -1; // -1 = default, -2 = loading, -3 = error private long soopyWeightLeaderboardPosition = -1; // -1 = default, -2 = loading, -3 = error private JsonObject guildInformation = null; + // Assume the player is in a guild until proven otherwise + private boolean isInGuild = true; private JsonObject playerStatus = null; private JsonObject bingoInformation = null; private long lastPlayerInfoState = 0; @@ -390,7 +392,8 @@ public class SkyblockProfiles { updatingGuildInfoState.set(false); if (jsonObject != null && jsonObject.has("success") && jsonObject.get("success").getAsBoolean()) { - if (!jsonObject.has("guild")) { + if (jsonObject.get("guild").isJsonNull()) { + isInGuild = false; return null; } @@ -406,6 +409,10 @@ public class SkyblockProfiles { return null; } + public boolean isPlayerInGuild() { + return isInGuild; + } + public List<String> getProfileNames() { return profileNames; } |