Minecraft Wiki
Advertisement
Information icon
This feature is exclusive to Java Edition. 

These commands control a server's banlist, or blacklist. A blacklist is a list of players or IP addresses that are not allowed to connect to the server. Bans supersede any whitelisting in place.

See also: /whitelist


ban

Commands/infobox

Adds a player to the blacklist.

Syntax
ban <name> [reason …]
Arguments
name
The name of the player to be banned. Does not need to be online, or even real.
reason (optional)
Text to be displayed with the ban, to other operators and in the server logs.
Result
Always succeeds. The player name is added to the server blacklist, which prevents anyone with that name from connecting to the server


ban-ip

Commands/infobox

Adds an IP address to the blacklist.

Syntax
ban-ip <address|name> [reason …]
Arguments
address|name
An IP address or the name of a player who is currently online
reason (optional)
Text to be displayed with the ban, to other operators and in the server logs.
Result
Fails if address|name is neither a valid IP address nor the name of an online player.
On success, the IP address (of the online player, or the address specified) is added to the server blacklist, which prevents anyone from connecting to the server from that address.


banlist

Commands/infobox

Displays the server's blacklist.

Syntax
banlist ips
banlist players
Result
Always succeeds. Displays banned IP addresses or banned players.
Advertisement