Commands/ban

From Minecraft Wiki
Jump to: navigation, search

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[edit | edit source]

ban
Restrictions

Multiplayer
Operator
No command blocks

First introduced

Alpha 1.0.16

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[edit | edit source]

ban-ip
Restrictions

Multiplayer
Operator
No command blocks

First introduced

Alpha 1.0.16

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[edit | edit source]

banlist
Restrictions

Multiplayer
Operator
No command blocks

First introduced

Alpha 1.0.16

Displays the server's blacklist.

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