Reset a Player's Location and Inventory on a Minecraft Server
You may wish to reset a player’s location and inventory or edit their player file on a Minecraft server from time to time. It is useful when you want the player to respawn at spawn with an empty inventory or need to pull a player out of an area of the world that is causing server crashes or slow downs. This tutorial will give you the option of resetting or editing a player’s location and inventory by removing or editing the playername.dat or uuid.dat file.
Alternative to Resetting
There is an alternative to resetting the playerdata. You can also roll back the playerdata to before any issues started with the player.
This Deletes Data
This process will empty the inventory of the player and reset their location to spawn. If you are an advanced user, you might be able to just edit the playerdata file as explained in the advanced section below.
Minecraft 1.7.6 or newer (UUID)
Simple Method
- Always make a backup before changing the files on your server.
- Stop your server
- Click here to look up the UUID of the player you wish to reset.
- Connect to the server SFTP.
- On the remote site, open the game folder.
- Open the world folder. It is usually world, unless you have changed it.
- Open playerdata.
- Delete, or download/rename and then delete,
uuidyoulookedup.dat
. (If you would rather not delete your inventory fully, or only want to reset your location, see the advanced section below.)
Advanced Users
Advanced users may want to edit their player’s data file using an external program called NBTExplorer. The benefit of editing the player’s data file is that their inventory won’t be erased or the player won’t lose modded information that is tied to the player. The advanced sections assumes that you have downloaded and opened NBTExplorer.
Advanced Method
- Follow all of the steps in the simple section except deleting the
uuid.dat
file. Instead of deletinguuid.dat
, download it to a location on your computer, such as your desktop, where you can easily find it. - From NBTExplorer, press the Open NBT Data Source button that looks like a folder.
- Navigate to where you saved the
uuid.dat
file, select it, and press open. - Scroll down until you find the tag labeled
Pos
with 3 entries and press the+
symbol next to it. These are the data tags that store where a player is in game. - Double click on the tags one at a time and change their values. The tags aren’t labelled, but they are
X
,Y
,Z
in that order.Y
is height. Be careful what you set these numbers to as you can cause a player to spawn in the ground. I suggest setting their value to your world’s spawn or a known safe coordinate location. - Upload the
uuid.dat
back to your server in the same place you got it. Overwrite or delete the original one. Make sure that the player in question is not online at the time or it won’t work.
Minecraft older than 1.7.6 (non UUID)
Only Older Minecraft
This section is only for Minecraft and modpacks based on Minecraft older than 1.7.6. It is very rare that you will need to use this section. All modpacks made within the last few years are 1.7.6 or higher.
- Make sure that the player you wish to reset is logged out of the server.
- Use WinSCP to connect to the server SFTP.
- On the remote site, open the game folder.
- Open the world folder. It is usually world, unless you have changed it.
- Open players.
- Simple: Delete, or download/rename and then delete,
playername.dat
. Replaceplayername
with the name of the player you wish to reset. - Advanced: Instead of deleting
playername.dat
, download it to a location on your computer, such as your desktop, where you can easily find it. - From NBTExplorer, press the Open NBT Data Source button that looks like a folder.
- Navigate to where you saved the
playername.dat
file, select it, and press open. - Scroll down until you find the tag labeled
Pos
with 3 entries and press the+
symbol next to it. These are the data tags that store where a player is in game. - Double click on the tags one at a time and change their values. The tags aren’t labelled, but they are
X
,Y
,Z
in that order.Y
is height. Be careful what you set these numbers to as you can cause a player to spawn in the ground. I suggest setting their value to your world’s spawn or a known safe coordinate location. - Upload the
playername.dat
back to your server in the same place you got it. Overwrite or delete the original one. Make sure that the player in question is not online at the time or it won’t work.
Updated about 1 year ago