Avoid saving profile on every login

This commit is contained in:
Kam committed 2025-07-07 05:50:29 -04:00
1 parent 18c6221dc0
commit 6bad9163a0
3 files changed
+14 -2

No files matched your search

@@ -81,7 +81,8 @@ public class Profile implements IProfile {
compound.setInteger("CurrentSlotId", currentSlotId);
NBTTagCompound slotsCompound = new NBTTagCompound();
for (Map.Entry<Integer, ISlot> entry : slots.entrySet()) {
// Save only non-temporary slots.
// Temporary slots (typically using negative IDs) are kept in memory
// only and skipped here so they never persist to disk.
if (entry.getValue().isTemporary())
continue;
slotsCompound.setTag(String.valueOf(entry.getKey()), entry.getValue().toNBT());