Sometimes a player can't be helped from inside the game. Their client crashes the moment they log in because of a broken block or entity nearby, they respawn into lava, or they are stuck in a dimension from a mod you removed. A teleport command would fix it, but nobody can run it: the player isn't online long enough, or the world won't stay loaded.
A player's position is just a few tags in their player file, so you can move them while the game is closed.
Find the file
On a server, the file is world/playerdata/<uuid>.dat up to 1.21.11 and world/players/data/<uuid>.dat from 26.1. In a singleplayer world up to 1.21.11 the player is inside level.dat, in Data › Player. The player data guide explains how to match a name to a UUID.
The position tags
- { }root
- StrDimension"minecraft:overworld"
- [ ]Pos
- D0152.5
- D171
- D2-38.5
- [ ]Rotation
- F090
- F10
- [ ]Motion
- D00
- D1-0.0784
- D20
- Dfall_distance0
| Tag | What to set |
|---|---|
[ ]Pos | Three Doubles: X, Y, Z. Use a block's coordinates plus 0.5 on X and Z to land in its center. |
StrDimension | minecraft:overworld, minecraft:the_nether or minecraft:the_end |
[ ]Motion | Set all three to 0 so the player doesn't arrive with the speed they had. |
Dfall_distance | 0, or a long fall is applied on arrival. Before 1.21.5 the tag was FFallDistance. |
SFire | 0 or less stops the player from burning on arrival. |
Pick a safe destination
- The world spawn is a reliable choice. It is in level.dat: the
spawncompound'sI[ ]posin recent versions, orSpawnX,SpawnY,SpawnZin older ones. - A place you know, such as your base. Use coordinates you noted with F3 earlier.
- Keep Y above the ground. If you aren't sure of the surface height, arriving a few blocks high costs a little fall damage; arriving inside stone suffocates the player.
- Nether coordinates are divided by 8. X 800, Z 1600 in the Overworld corresponds to X 100, Z 200 in the Nether. If you change Dimension, change Pos to match.
Step by step
- Stop the server, or close the game. The player must be offline.
- Copy the player file as a backup.
- Open it in the editor and expand
Pos. - Click each of the three values and type the new coordinates. They stay Doubles even if you type whole numbers.
- If needed, change
Dimension, set the threeMotionvalues to 0 andfall_distanceto 0. - Download, put the file back with the same name, start the server and ask the player to log in.
If the player is riding something
A player who logged off on a horse, boat or minecart has a { }RootVehicle compound holding that vehicle. On login, the vehicle is placed first and the player is seated in it, which can bring the problem back. Remove RootVehicle with the ☰ menu (Remove); the vehicle is lost, but the player arrives on foot at the new position.
When the crash comes from the area itself
Moving the player only avoids the problem. If a broken entity or block entity crashes the game whenever its chunk loads, anyone who walks there later will crash too. Remove the cause with a region tool such as MCA Selector, or restore that region file from a backup, before players go back. To find which chunk it is in, open the region file in DAT Editor: its search lists every entity and block entity matching a name or an id, with coordinates.