How to Ban and Unban Players on Your Minecraft Server
Would you like to prevent a player from connecting to your Minecraft server? Minecraft's built-in ban feature allows you to block a player account or IP address. A ban remains active until you manually remove it. In this guide, we explain how to ban and unban players and view the ban list of your Minecraft server.
Note You need OP permissions to run the commands in this guide in-game.
Tip All in-game commands can also be run from the console. However, do not use a / before commands entered in the console.Banning a Player
A player ban blocks a player's Minecraft account. This prevents the player from connecting with the same account, even from another IP address.
- Run the following command in-game. Replace
PLAYERNAMEwith the player's Minecraft username:
/ban PLAYERNAMEWould you like to add a reason for the ban? Place it after the player's username. For example:
/ban PLAYERNAME Using hacks- Press Enter. If the player is online, they will be removed from the server immediately and will no longer be able to reconnect.
Tip You can also ban an online player through the game panel. Open the Players page and click Ban next to the relevant player.
Banning an IP Address
An IP ban blocks all connections from a specific IP address. This prevents a player from bypassing the ban by using another Minecraft account on the same network.
Note Multiple players may use the same IP address, for example within a household, school or public network. An IP ban may therefore block other players as well. A player may also be able to bypass the ban by using a VPN or obtaining a new IP address.
- Run the following command in-game to ban the IP address of an online player:
/ban-ip PLAYERNAMEYou can also enter an IP address directly:
/ban-ip IP-ADDRESSWould you like to add a reason? Place it after the player's username or IP address.
- Press Enter. All connections from the specified IP address will be blocked.
Tip You can also give an online player an IP ban through the Players page in the game panel. Click Ban IP next to the player.
Unbanning a Player
- Run the following command in-game. Replace
PLAYERNAMEwith the banned player's username:
/pardon PLAYERNAME- Press Enter. The player will be removed from the ban list and can connect again.
Tip You can also remove the ban through the Players page in the game panel. Click Pardon Ban next to the banned player.
Note The built-in command for removing a ban is/pardon, not/unban. The/unbancommand only works when an installed plugin adds it.
Unbanning an IP Address
- Run the following command in-game. Replace
IP-ADDRESSwith the banned IP address:
/pardon-ip IP-ADDRESS- Press Enter. Players can now connect from this IP address again.
Tip You can also remove an IP ban through the Players page in the game panel. Click Pardon IP Ban next to the banned IP address.
Viewing the Ban List
Use the following command to view all banned players:
/banlist playersUse the following command to view all banned IP addresses:
/banlist ipsTip Minecraft's built-in ban feature does not support temporary bans. Would you like to issue temporary bans, warnings and mutes, or use other moderation features? Install a moderation plugin such as AdvancedBan.