diff --git a/pom.xml b/pom.xml index dce85d13..83884778 100644 --- a/pom.xml +++ b/pom.xml @@ -118,7 +118,7 @@ de.tr7zw item-nbt-api-plugin - 2.8.0 + 2.11.2 diff --git a/src/main/java/io/servertap/api/v1/PlayerApi.java b/src/main/java/io/servertap/api/v1/PlayerApi.java index ef36c0b3..98573214 100644 --- a/src/main/java/io/servertap/api/v1/PlayerApi.java +++ b/src/main/java/io/servertap/api/v1/PlayerApi.java @@ -1,7 +1,6 @@ package io.servertap.api.v1; import de.tr7zw.nbtapi.NBTFile; -import de.tr7zw.nbtapi.NBTListCompound; import io.javalin.http.*; import io.javalin.openapi.*; import io.servertap.Constants; @@ -227,13 +226,13 @@ public static void getPlayerInv(Context ctx) { } NBTFile playerFile = new NBTFile(playerfile); - for (NBTListCompound item : playerFile.getCompoundList("Inventory")) { + playerFile.getCompoundList("Inventory").forEach(item -> { ItemStack itemObj = new ItemStack(); itemObj.setId(item.getString("id")); itemObj.setCount(item.getInteger("Count")); itemObj.setSlot(item.getInteger("Slot")); inv.add(itemObj); - } + }); ctx.json(inv);