mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-27 06:12:56 +00:00
Avoid saving profile on every login
This commit is contained in:
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());
|
||||
|
||||
Reference in new issue
Block a user