KnowledgebaseManaging your Server

How to Ban and Unban a Player on Your Minecraft Server

How to Ban and Unban a Player on Your Minecraft Server

Managing Your Server
·
Sep 11, 2024
·
4 min read

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.

Important Reminder

You need to be an operator (OP) to be able to use these commands in-game. If you are not yet an operator, you can follow our guide here: How to get OP on a Minecraft Server.

#Banning a Player or IP

There are a couple of different commands you can use to ban a player from your server.

  • /ban <username> [reason] 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] This command bans a player by their IP, preventing anyone from connecting to your server from the same IP address. If you do not know the IP of a player, you can use the username of an online player to ban their current IP. Providing a reason is optional.


#Unbanning a Player or IP

Unbanning players works in a similar manner. The following commands can be used to unban a player from your server.

  • /pardon <username> This command unbans a player who has previously been banned from your server.

  • /pardon-ip <IP> This command unbans an IP address that you've previously banned. Note that usernames do not work with this command; only valid IP addresses.


#Viewing Banned Players or IP Addresses

Listing all bans works with a similar command. The following commands can be used to view all active bans on your server.

  • /banlist ips This command displays all IP addresses that are currently banned from the server.

  • /banlist players This command displays all usernames of players who are currently banned from the server.

Rejoindre Discord