Skip to content

Commit

Permalink
fix: pass correct arrays for conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
bconlon1 committed Dec 11, 2023
1 parent 50d5113 commit 1e4f6e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/aetherteam/nitrogen/api/users/UserData.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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();
Expand Down

0 comments on commit 1e4f6e8

Please sign in to comment.