diff options
-rw-r--r-- | me/Danker/handlers/APIHandler.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/me/Danker/handlers/APIHandler.java b/me/Danker/handlers/APIHandler.java index 67527b3..e81b1f1 100644 --- a/me/Danker/handlers/APIHandler.java +++ b/me/Danker/handlers/APIHandler.java @@ -125,7 +125,10 @@ public class APIHandler { for (JsonElement profile : profilesArray) { JsonObject profileJSON = profile.getAsJsonObject(); - long profileLastSave = profileJSON.get("members").getAsJsonObject().get(UUID).getAsJsonObject().get("last_save").getAsLong(); + long profileLastSave = 0; + if (profileJSON.get("members").getAsJsonObject().get(UUID).getAsJsonObject().has("last_save")) { + profileLastSave = profileJSON.get("members").getAsJsonObject().get(UUID).getAsJsonObject().get("last_save").getAsLong(); + } if (profileLastSave > latestSave) { latestProfile = profileJSON.get("profile_id").getAsString(); |