How to fix Invalid Player Data in Single Player?
The only thing to do to solve the Invalid Player Data in Minecraft is to access the folder of the world in which the error occurs and enter the playerdata folder. Once inside, check if there is any file that is not in the .DAT or .DAT_OLD format, if there is, delete it from that folder and you will have solved the error. If the error is still not resolved, enter the world and store all the items in a chest. After doing this delete the .DAT and .OLD_DAT files, in this way you will lose the progress (Experience, Statistics...) but you will not lose the inventory or any construction. Finally, if you still get the same error, the final solution would be to delete the world and create another one, but this way you would lose all your progress.
How to solve Invalid Player Data on Servers?
On servers this problem can come for several reasons, among them are:
- Unsuccessful chunk updates: When updating the version of Minecraft with a modified Jar such as Bukkit, Paper, Spigot, Purpur... errors may occur in the updates. In this way the chunks can be corrupted and become unusable. This case can be when you have recently updated Jar, anyway this can also be fixed by a chunk reset program, in this program you can reset and delete corrupted chunks in a very easy way. Link: https://github.com/Querz/mcaselector
- Infected Plugins: If you have plugins downloaded from forums such as Black Spigot, there may be a plugin that is affecting the server. Many times people inject malware into plugins so that the plugins are uploaded directly to the server. In these cases you can try to remove the Jar from that plugin. Many times, after deleting the plugin, it still gives errors, since malware plugins often corrupt files to cause constant server crashing.
- Corrupt Player Data file: Oddly enough, server crashes can cause it to stop working properly. Ending the server process unexpectedly usually causes errors in data saving, so we recommend making backups several times a month. To solve this, the best thing would be to delete the old playerdatas, from people who haven't entered the server for months. In this way the server will take less time to start and the player data error can be solved. If this does not solve it, you can also delete the old playerdatas of the players also known as .DAT_OLD files these files are easily corrupted and Minecraft itself does not use them at all.
- File out of place in the Player Data folder: Many times, unintentionally or unintentionally, we get confused with the directory when adding new plugins or files to our server. This can cause certain errors on the servers, one of them the famous Invalid Player Data. And it is that if you inadvertently put a file that is not .DAT in that same folder, the server will give this error because it tries to read the player data, but it cannot read it because it is not one of them. The solution in this case would be to delete the misplaced file.
- In some cases the console can give us NBT errors. In these cases, it is best to contact the support of the .Jar itself, be it Bukkit, Spigot, Paper, Purpur... so that they can patch these errors as soon as possible. If you are experiencing this error on console, you will not be able to fix it on your own.