Short answer: nothing was deleted. When online-mode changed, each player got a new UUID, and the server created a new, empty file for that UUID. The old inventory is still in playerdata/ under the previous UUID. Stop the server, copy the old file over the new one, and the player gets everything back.
How to tell it happened
- Players spawn at the world spawn with nothing, but the world and their builds are intact.
playerdata/(orplayers/data/since 26.1) contains two files for the same person: an old, large one and a new, small one with today's date.- The two UUIDs differ in their 13th character:
4for online,3for offline.
Fix every affected player at once
- Stop the server, then open its folder in the editor with Open folder (Chrome or Edge).
- Open Players, then Online / offline UUIDs. The editor detects the mode the server uses now from the latest logins.
- The players have two files section lists everyone with an old and a new file, with each file's play time and last save. The one with more play time is picked by default.
- Click Migrate. The old inventory, advancements and statistics move to the current UUID. The short-lived new file goes to
.dat-editor-historyas long as Keep previous versions is ticked under the editor.
If the player played a lot in the new mode too, keep the new file instead, and use Move to another account to bring over only the old inventory and ender chest.
By hand, for one player
- Find both UUIDs: the current one in
usercache.json(the newest entry with the player's name), the old one from the file list or your logs. - With the server stopped, rename the new
<new-uuid>.datto keep it aside, then copy<old-uuid>.datto<new-uuid>.dat. - Do the same in
advancements/andstats/with the.jsonfiles. - Open the copied file in the editor and set
I[ ]UUIDto the new UUID. The game usually copes without it, but plugins that read the file may not.
Stop it from happening again
Pick one mode and keep it. If you have to switch, migrate everyone before the first player joins in the new mode: the switching guide walks through it. Keep in mind that offline mode lets anyone join under any name, including yours, unless an authentication plugin protects the accounts.