fix armor dupe bug

The continue "skipped" the armor entries in the database instead of
writing an explicit "air" item into the slot.

When restoring, only existing entries are being restored, all other
items are left untouched. Allowing to dupe items in armor slots.
This commit is contained in:
EoD 2025-04-26 18:32:43 +00:00
parent 92e95a94a4
commit 0fb6bb81e1

View File

@ -269,7 +269,6 @@ public class VanillaSync {
Map<Integer, String> equipment = new HashMap<>();
for (int i = 0; i < player.getInventory().armor.size(); i++) {
ItemStack itemStack = player.getInventory().armor.get(i);
if (itemStack.isEmpty()) continue;
equipment.put(i, serialize(itemStack.serializeNBT().toString()));
}
// Inventory