Move a stuck player: change position or dimension offline

When a player crashes on login, dies in a loop or is trapped somewhere commands can't reach, move them by editing Pos and Dimension in their player file.

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

Position and movement tags of a player
  • { }root
    • StrDimension"minecraft:overworld"
    • [ ]Pos
      • D0152.5
      • D171
      • D2-38.5
    • [ ]Rotation
      • F090
      • F10
    • [ ]Motion
      • D00
      • D1-0.0784
      • D20
    • Dfall_distance0
TagWhat to set
[ ]PosThree Doubles: X, Y, Z. Use a block's coordinates plus 0.5 on X and Z to land in its center.
StrDimensionminecraft:overworld, minecraft:the_nether or minecraft:the_end
[ ]MotionSet all three to 0 so the player doesn't arrive with the speed they had.
Dfall_distance0, or a long fall is applied on arrival. Before 1.21.5 the tag was FFallDistance.
SFire0 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 spawn compound's I[ ]pos in recent versions, or SpawnX, SpawnY, SpawnZ in 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

  1. Stop the server, or close the game. The player must be offline.
  2. Copy the player file as a backup.
  3. Open it in the editor and expand Pos.
  4. Click each of the three values and type the new coordinates. They stay Doubles even if you type whole numbers.
  5. If needed, change Dimension, set the three Motion values to 0 and fall_distance to 0.
  6. 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.

Ready to edit?Open the file in the editor: every value keeps its NBT type and the file is saved in its original format.