1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2026-01-06 15:41:50 +00:00

Fix NPE that can rarely occur when debugging inventories

This commit is contained in:
onebeastchris
2025-04-01 18:08:15 +02:00
parent 90e9c3a123
commit 3239e612dd

View File

@@ -493,9 +493,12 @@ public class InventoryUtils {
return "null";
}
String inventoryType = inventory.getContainerType() != null ?
inventory.getContainerType().name() : "null";
return inventory.getClass().getSimpleName() + ": javaId=" + inventory.getJavaId() +
", bedrockId=" + inventory.getBedrockId() + ", size=" + inventory.getSize() +
", type=" + inventory.getContainerType().name() + ", pending=" + inventory.isPending() +
", type=" + inventoryType + ", pending=" + inventory.isPending() +
", displayed=" + inventory.isPending() + ", delayed=" + inventory.isPending();
}
}