From 1e4f6e8164595e513c0d911d75f5cbc5ef4db50b Mon Sep 17 00:00:00 2001 From: bconlon Date: Sun, 10 Dec 2023 22:15:03 -0800 Subject: [PATCH] fix: pass correct arrays for conversion --- src/main/java/com/aetherteam/nitrogen/api/users/UserData.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/aetherteam/nitrogen/api/users/UserData.java b/src/main/java/com/aetherteam/nitrogen/api/users/UserData.java index af20b7f..4166059 100644 --- a/src/main/java/com/aetherteam/nitrogen/api/users/UserData.java +++ b/src/main/java/com/aetherteam/nitrogen/api/users/UserData.java @@ -110,7 +110,7 @@ private static void parseUserData(MinecraftServer server, ServerPlayer serverPla if (!pastTiersArray.isEmpty()) { int pastTierLevel = 0; try { - for (int pastTierId : jsonToArray(array).stream().map((JsonElement::getAsInt)).toList()) { + for (int pastTierId : jsonToArray(pastTiersArray).stream().map((JsonElement::getAsInt)).toList()) { if (pastTierId != -1) { User.Tier pastTier = User.Tier.byId(pastTierId); if (pastTier != null) { @@ -135,7 +135,7 @@ private static void parseUserData(MinecraftServer server, ServerPlayer serverPla if (!groupsArray.isEmpty()) { int groupLevel = 0; try { - for (String groupName : jsonToArray(array).stream().map((JsonElement::getAsString)).toList()) { + for (String groupName : jsonToArray(groupsArray).stream().map((JsonElement::getAsString)).toList()) { User.Group group = User.Group.valueOf(groupName.toUpperCase(Locale.ROOT)); if (group.getLevel() > groupLevel) { groupLevel = group.getLevel();