Direct answer
If only one player gets Invalid player data while others can join, first back up the entire server and inspect the join-time exception for a plugin/mod that owns custom player data. If the vanilla player NBT itself is corrupt and no better backup exists, moving that player’s .dat file out of <world>/playerdata/ can force Minecraft to create a fresh one.
Prefer restoring the player file from backup
A backup preserves inventory, position, health, ender chest, XP, and other vanilla player state. Replacing the file with a fresh one loses that vanilla player state, so use deletion/reset only after keeping a copy of the broken file.
Find the correct UUID before touching files
Playerdata files are named by UUID, not username. On authenticated servers, use the UUID the server records for that player. Proxy/offline-mode misconfiguration can change UUID handling, so fix identity forwarding before assuming the file is corrupt.
Modded servers may store data elsewhere
Mods can attach additional capabilities/components outside vanilla player NBT. Resetting the vanilla .dat may not remove the actual bad mod data, and it can create unnecessary item/progress loss. Read the crash/latest log to identify the mod or serialization error first.
Test safely
- Stop the server.
- Create a full backup or test copy.
- Move, do not permanently delete, the suspect UUID
.dat. - Start the test copy and have only that player join.
- If the problem persists, restore the file and continue with the plugin/mod indicated by the log.
- Back up the entire playerdata directory and note the player UUID before editing anything. Confirm whether the problem affects one UUID or all users.
- Check whether the account identity changed because online-mode or proxy forwarding was modified. Inventory appearing empty is not proof that a file is corrupt.
- Restore only from a verified backup or use a compatible NBT inspection tool on a copy; never delete the original player file to “test” corruption.
Official references
These references were checked while preparing this fix. Version-specific behavior can change, so use the project documentation for your exact release when a detail differs.
Related fixes and guides
Help us improve this article
Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.