We have a video tutorial for banning and unbanning players on your server:
Banning functionality is built into every Minecraft server out of the box, allowing you to prevent unwanted players from connecting to and playing on your server. Of course, you can also pardon, or unban, a player that you have previously banned if you would like them to be able to play on your server again.
- The commands mentioned in this tutorial are available in Minecraft Java Edition only.
- You need to be an operator (OP) to be able to use these commands in-game. You can set yourself as an operation by following this tutorial: Giving Operator (OP) to a Player
- To use these commands via your server's console, simply remove the
/
symbol before the command.
BANNING A PLAYER OR IP
There are a couple of different commands you can use to ban a player from your server.
COMMAND | DESCRIPTION |
---|---|
/ban <username> [reason] Example: /ban Steve griefing |
This command bans a player by their Minecraft username, preventing them from using their account to connect to your server. Providing a reason is optional. |
/ban-ip <IP|username> [reason] Example: /ban-ip 172.0.0.1 or /ban-ip Steve hacking |
This command bans a player by their IP, preventing anyone from connecting to your server that tries to log in from the same IP address. You can use the username of an online player to ban the IP they're using. Providing a reason is optional. |
UNBANNING A PLAYER OR IP
Unbanning a player works in a similar manner. The following commands can be used to unban a player from your server.
COMMAND | DESCRIPTION |
---|---|
/pardon <username> Example: /pardon Steve |
This command unbans a player that has previously been banned from your server. |
/pardon-ip <IP Address> Example: /pardon-ip 172.0.0.1 |
This command unbans an IP address that you've previously banned. Note that only valid IP addresses work with this command, not player names. |
VIEWING BANNED PLAYERS OR IP ADDRESSES
Listing all bans works in a similar way. The following commands can be used to view all active bans on your server.
COMMAND | DESCRIPTION |
---|---|
/banlist ips |
This command displays all IP addresses that are banned from your server. |
/banlist players |
This command displays all Minecraft username of players banned from your server. |