Slimefun / Slimefun4

Slimefun 4 - A unique Spigot/Paper plugin that looks and feels like a modpack. We've been giving you backpacks, jetpacks, reactors and much more since 2013.
GNU General Public License v3.0
958 stars 547 forks source link

Players Lost Backpack Data Updating Slimefun #4141

Closed GitNuck closed 6 months ago

GitNuck commented 6 months ago

❗ Checklist

📍 Description

I updated the Server to Dev Build 1139 and some players lost their backpacks. The data has been completely scrubbed from the Player's .yml file. What is odd is only certain players have lost their backpacks, others are fine. What I do know is that these Players most likely use a modded Client, so this may be part of the issue somehow.

📑 Reproduction Steps

Certain players try and access their backpack and have, "CS-CoreLib's Head" displayed instead.

💡 Expected Behavior

Players able to access their backpacks.

📷 Screenshots / Videos

cscorehead

📜 Server Log

No error messages

📂 /error-reports/ folder

No response

💻 Server Software

Purpur

🎮 Minecraft Version

1.20.x

⭐ Slimefun version

2024-02-23_13 08 06

🧭 Other plugins

2024-02-23_13 09 36

Boomer-1 commented 6 months ago

can you confirm that the alleged missing backpacks were created by those players? the person who crafted them, if done in the enhanced workbench has their id assigned to it, not the person who uses it. it may help to track that info down. otherwise if autocrafted, its the first person who opens them. of course they shouldn't convert to cs heads, but it might help track the cause

Boomer-1 commented 6 months ago

one other thought - did any other players join after you updated to 1139, whose backpacks were fine?

GitNuck commented 6 months ago

They did indeed craft those backpacks, I am sure that one of the mods, a Fabric inventory mod called "itemscroller" was the issue. It plays with inventory entries so that had to be the issue. I use InventoryRollbackPlus on the Server and it saved the day, I was able to recover the Player's backpacks complete with the inventory inside. I'll mark this closed as I'm 99.99% sure that the mod was responsible. Also it looks like tweakaroo plays with inventory items as well. I tell my Players upfront I am not fond of mods like this, especially if they give unfair advantages over vanilla Players. In the future Players that run modded Clients and lose their stuff on my Server will have to suck it up. inventorey scroller

GitNuck commented 6 months ago

Thanks for the help!

GitNuck commented 6 months ago

one other thought - did any other players join after you updated to 1139, whose backpacks were fine?

Yes, other players did indeed join after the update and their backpacks were fine.

JustAHuman-xD commented 6 months ago

I highly doubt the mods had anything to do with this

JustAHuman-xD commented 6 months ago

I've played with many mods like that including those 2 listed and never experienced this, and it wouldn't make sense that this could even be caused by a client sided mod when it's on the server. I'd like to continue looking into this

GitNuck commented 6 months ago

Sure thing, let me know if you need anything and I'll do my best to help. It just seems so odd that the modded clients were the only ones to have the issue. I just had another player report they couldn't harvest their ExoticGarden items as well in the same time frame. They tried today and are able to harvest again.

GitNuck commented 6 months ago

Going through the logs I kept seeing after every chat, "Is the client/server system time unsynchronized?" and I noticed even though there were two players on at the time, Slimefun was saving data for only 1 player. I saw that even today I was getting the unsynchronized time errors after every chat entry. I synchronized the server time with Windows and it adjusted the time by almost a full minute. I then tested by typing in game and the error was gone. Perhaps this was the issue? Kind of makes more sense.

WalshyDev commented 6 months ago

Time also shouldn't be related

What version were you previously on before updating? Can you retrieve the player files from the backups? Slimefun does a backup every restart. If yes, please restore and see if you have problems again. If you do, send the player file.

GitNuck commented 6 months ago

I was on 1138 and I checked the backups, the backups had no backpacks listed for the problematic players.

GitNuck commented 6 months ago

I asked the Player involved if they were sure they crafted the backpacks, and this morning he messaged me that they forgot a friend on the server made them and gave them the backpacks. So no bug, sorry to waste everyone's time, I just went on what was reported to me.

Boomer-1 commented 6 months ago

that explains why they weren't in the specific players file, but not why they turned into cs core heads

GitNuck commented 6 months ago

Ah OK so it looks like legit bug then.

GitNuck commented 6 months ago

I'll ad some more to the weird. The Player file stored in Slimefun for this player has no entries for backpacks, yet after several reboots his backpacks have remained complete with inventory, and are functional. I used InventoryRollbackPlus to give back those backpacks, but noticed that no entries for backpacks or inventory were made in the Slimefun Player file. I checked his Inventory while the player was AFK and sure enough they are there. No Entries

GitNuck commented 6 months ago

2024-02-24_14 12 51

Boomer-1 commented 6 months ago

remember the backpack is stored with the player who first opened / crafted it.

GitNuck commented 6 months ago

remember the backpack is stored with the player who first opened / crafted it.

Thank-you, I thought only the person who crafted the item could use the backpack, unless an AutoCrafter for SF items was used to make it, and then a gifted backpack would only work for the giftee if they were the first person to use it.

WalshyDev commented 6 months ago

The UUID for the player who owns it is in the lore. That's the file you want look at, the items are there.

J3fftw1 commented 6 months ago

Please create a new issue for the backpack turning into a cs-corelib head. The issue isnt related to the issue mentioned