How to Fix Scoreboard Data Crash
On 26.2 a damaged scoreboard.dat is logged and swapped for an empty scoreboard, while a mod adding an existing objective can crash the game. Fixes for both.
Quick Fix
Stop the server and restore scoreboard.dat from your last backup. It is in the world's data/minecraft folder on 26.1 and later, and directly in data on older versions.
Error Message
Error loading saved data: SavedDataType[minecraft:scoreboard]How to Fix
As soon as the loading error shows up, copy scoreboard.dat somewhere safe. The server carries on with an empty scoreboard and writes it over the damaged file at the next world save, and stopping the server counts as a save.
Stop the server, put scoreboard.dat back from your most recent backup and start it again. Objectives, scores, teams and display slots come back as they were at that backup.
Without a backup, keep the new empty scoreboard and create objectives and teams again. Data packs that set up their objectives in a load function do this themselves when the world loads.
For a crash report with An objective with the name 'kills' already exists!, read the lines of the stack trace under the error. They show which mod's code made the call, so update that mod or remove it.
The message An objective already exists by that name needs no fix. To change an objective's settings, remove it first with /scoreboard objectives remove and its name, then add it again.
Common Causes
- scoreboard.dat can't be read because it was cut off. The game writes the file in place, so a server that is killed during a save, or a disk that fills up, can leave a broken file. The next start logs Error loading saved data: SavedDataType[minecraft:scoreboard] with a stack trace.
- The file opens but its contents don't match the expected format, for example after editing it with an outside tool. The log says Failed to parse saved data for 'SavedDataType[minecraft:scoreboard]', and the game keeps what it could read or starts with an empty scoreboard.
- A mod adds an objective that already exists. Minecraft's scoreboard code then throws java.lang.IllegalArgumentException: An objective with the name 'kills' already exists!, and if the mod doesn't catch it, the game or server crashes.
- Someone ran /scoreboard objectives add with a name that is already taken. That only prints An objective already exists by that name and changes nothing.
Diagnostic Steps
- Search latest.log for saved data, or open the newest crash report.
- Copy scoreboard.dat somewhere safe before the server saves again.
- Stop the server and restore the file from a backup.
- Start the server and check the log again.
- Recreate any objectives, teams or display slots that are still missing.
FAQ
Does a broken scoreboard.dat crash the server?
Not on 26.2. The error goes to the log, the world loads with an empty scoreboard, and that empty scoreboard is saved over the old file later. Copy the file before you stop the server if you want to keep it.
Is "An objective already exists by that name" something I need to fix?
No. /scoreboard objectives add was run for a name that is already in use, so the command did nothing. Load functions in data packs run with their output hidden, so a pack that repeats the command on every load won't show it.
Where is scoreboard.dat stored?
Inside the world folder, in data/minecraft since 26.1 and directly in data before that. It holds objectives, scores, teams and the objective shown in each display slot.