The bug
Items which are currently being held with the mouse (not placed in any inventory slot) get permanently lost during server shutdown, even if the world is saved beforehand.
How to reproduce
In a multiplayer server, pick up any item from your inventory, nearby chest, or other container
Continue to hold the item with the mouse cursor
Restart the server and rejoin
→ ❌ The item is permanently lost, because it is not saved anywhere in the player or chunk data while being held
Potential fix might be to drop the item on the ground or return it back to its initial slot/container.
Linked issues
is duplicated by 1
relates to 1
Attachments
Comments 9
After attempting to use both an in-client and dedicated server of my own to verify, this appears to be specific to one server I was playing. Odd, considering it is vanilla and uses no plugins. Well, either way this can probably be considered dead. I will attempt to get more information out of the server owner when he is on later. Sorry to waste your time.
Surprisingly, I am able to reproduce this issue consistently on 1.13.2 vanilla server. Firstly the item is dropped on the ground, while on every second stop / restart the item is permanently lost, even if 'save-all' command is executed just before that. There are no warnings or errors in the console, nor any odd behaviour on client / server side.
Quite a while ago a few players have lost some of their important shulker boxes with everything inside on our 1.12 survival server because of this issue.
I will provide additional information if necessary, and could also try to make a video showing the steps to reproduce it consistently.
Reopened and changed the reporter to @unknown, see https://www.reddit.com/r/Mojira/comments/blp2ii/items_are_getting_lost_on_server_shutdown_if_held/
I tested this about 25 times on a vanilla 1.15.2 server, and the bug occurred about 5 times. (I lost the exact count)
So most times the item gets saved properly and drops as an item entity when the player rejoins, but about 1 in 5 times the item fails to get saved and disappears.
As of 24w11a both the cursor item and any items in the crafting slots seem to be getting deleted, while the rest of the world gets saved properly. This happens very consistently; I've tested about 10 times now, and only once have the cursor item and crafting slot items popped out as entities when I restarted and rejoined.
Are you using craftbukkit or the Minecraft server?
Edit: Nevermind... It says it's in the snapshot, so it must be Minecraft server... Still, please give more detail.