How to unban players in Minecraft
There are two methods to unban a player.
Either via admin command or directly in the banned-players.json
.
Admin Command
Open the chat and type the following:pardon Playername
Replace Playername with the name of the banned player and press Enter.
Note: This command only works correctly if your server’s online mode is enabled.
banned-players.json
You will need an FTP client like Filezilla.
- Start and stop your server. The server status must be
Server not running
! - Connect to your Game Server FTP using your FTP client.
The login details required for Filezilla can be found in your server configuration under FTP. - The required file
banned-players.json
is located in theminecraft-data
directory.
Download it and open it with a text editor like Notepad. - A player’s entry looks like this:
[
{
"uuid": "2940c4f7-f3c8-4838-a1d4-f19981af3950",
"name": "nutties_nuts",
"created": "2023-07-27 09:35:17 +0200",
"source": "Console",
"expires": "forever",
"reason": "The Ban Hammer has spoken!"
}
]
With multiple players:
[
{
"uuid": "6cdae416-9ce2-4df9-8688-d1eb3c185ef4",
"name": "Player1",
"created": "2023-07-27 09:35:17 +0200",
"source": "Console",
"expires": "forever",
"reason": "The Ban Hammer has spoken!"
},
{
"uuid": "6cdae416-9ce2-4df9-8688-d1eb3c185ef5",
"name": "Player2",
"created": "2023-07-27 09:35:17 +0200",
"source": "Console",
"expires": "forever",
"reason": "The Ban Hammer has spoken!"
},
{
"uuid": "6cdae416-9ce2-4df9-8688-d1eb3c185ef6",
"name": "Player3",
"created": "2023-07-27 09:35:17 +0200",
"source": "Console",
"expires": "forever",
"reason": "The Ban Hammer has spoken!"
}
]
Delete the entry for the player you want to unban, for example:
[
{
"uuid": "6cdae416-9ce2-4df9-8688-d1eb3c185ef5",
"name": "Player2",
"created": "2023-07-27 09:35:17 +0200",
"source": "Console",
"expires": "forever",
"reason": "The Ban Hammer has spoken!"
},
{
"uuid": "6cdae416-9ce2-4df9-8688-d1eb3c185ef6",
"name": "Player3",
"created": "2023-07-27 09:35:17 +0200",
"source": "Console",
"expires": "forever",
"reason": "The Ban Hammer has spoken!"
}
]
- Save your changes and upload the file again.
- Start your server.
Important: If you want to unban all players, make sure that the []
remains in the file.
Otherwise, the server will crash on startup.
Since the file is in JSON format, we recommend using a validator such as JSON Formatter.
If the file’s formatting is incorrect, it will either be overwritten by the server with a default version or cause the server to crash on startup.