Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/ban: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Fix template calls: add MC/ prefix
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{About|the command that kicks and bans players from a server|the command that only kicks players|Commands/kick}}
{{About|the command that kicks and bans players from a server|the command that only kicks players|Commands/kick}}
{{MC/Redirect|Blocked|the game mechanic that prevents an attack from taking effect|Blocking}}
{{Redirect|Blocked|the game mechanic that prevents an attack from taking effect|Blocking}}
{{MC/Exclusive|java}}
{{Exclusive|java}}


These commands control a [[Minecraft:Server|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.
These commands add a single or multiple players into the [[Minecraft:server]]'s ban list (or blacklist) by their game profile or IP address. A ban list is a list of players or IP addresses that are not allowed to connect to the server; this list supersede any whitelisting in place.
 
To remove players from the ban list, operator may use {{cmd|pardon}} or manually removing it from the [[Minecraft:Server.jar#Content|banned-players.json]].


== ban ==
== ban ==
Line 18: Line 20:


=== Arguments ===
=== Arguments ===
{{MC/Argument|targets|game_profile}}
{{argument|targets|game_profile}}
: Specifies the player profile(s) to be added to the blacklist.
: Specifies the player profile(s) to be added to the blacklist.
: {{MC/Arg desc|je=game_profile}}
: {{arg desc|je=game_profile}}


{{MC/Argument|reason|message}}
{{argument|reason|message}}
: Message to display to the banned player, to other operators, and in the server logs.  If unspecified, defaults to <code>Banned by an operator.</code>
: Message to display to the banned player, to other [[Minecraft:operator]]s, and in the server logs.  If unspecified, defaults to <code>Banned by an operator.</code>
: {{MC/Arg desc|je=message}}
: {{arg desc|je=message}}


=== Result ===
=== Result ===
Line 35: Line 37:


=== Output ===
=== Output ===
{{MC/Output table}}
{{Output table}}
{{MC/Output table|edition=je|On fail|N/A|0|0}}
{{Output table|edition=je|On fail|N/A|0|0}}
{{MC/Output table|On success|N/A|1|the number of new player names added to blacklist.}}
{{Output table|On success|N/A|1|the number of new player names added to blacklist.}}
{{MC/Output table}}
{{Output table}}


== ban-ip ==
== ban-ip ==
Line 53: Line 55:


=== Arguments ===
=== Arguments ===
{{MC/Argument|targets|string}}
{{argument|targets|string}}
: Specifies the IP address to be added to the blacklist. Can also be a name of an online player, which represents the IP of that player.
: Specifies the IP address to be added to the blacklist. Can also be a name of an online player, which represents the IP of that player.
: {{MC/Arg desc|je=string|type=word}}
: {{arg desc|je=string|type=word}}
: Since this, it is impossible to ban an IPv6 address in this way.<ref>{{Bug|MC-97885||/ban-ip doesn't work with IPv6 addresses}}</ref>


{{MC/Argument|reason|message}}
{{argument|reason|message}}
: Message to display to the banned player, to other operators, and in the server logs. If unspecified, defaults to <code>Banned by an operator.</code>
: Message to display to the banned player, to other [[Minecraft:operator]]s, and in the server logs. If unspecified, defaults to <code>Banned by an operator.</code>
: {{MC/Arg desc|je=message}}
: {{arg desc|je=message}}


=== Result ===
=== Result ===
Line 70: Line 73:


=== Output ===
=== Output ===
{{MC/Output table}}
{{Output table}}
{{MC/Output table|edition=je|On fail|N/A|0|0}}
{{Output table|edition=je|On fail|N/A|0|0}}
{{MC/Output table|On success|N/A|1|the number of online players that connecting with the specified IP}}
{{Output table|On success|N/A|1|the number of online players that connecting with the specified IP}}
{{MC/Output table}}
{{Output table}}


== banlist ==
== banlist ==
Line 94: Line 97:


=== Output ===
=== Output ===
{{MC/Output table}}
{{Output table}}
{{MC/Output table|edition=je|On success|N/A|1|the number of entries in the specified list.}}
{{Output table|edition=je|On success|N/A|1|the number of entries in the specified list.}}
{{MC/Output table}}
{{Output table}}


== banip ==
== banip ==
Line 104: Line 107:
}}
}}


Bans a player by IP number. Cannot be undone in-game; {{MC/Cd|banned-ip.txt}} must manually be changed.
Bans a player by IP number. Cannot be undone in-game; {{cd|banned-ip.txt}} must manually be changed.


The Classic equivalent of {{MC/Cmd|ban-ip}}.
The Classic equivalent of {{cmd|ban-ip}}.


=== Syntax ===
=== Syntax ===
Line 113: Line 116:
== History ==
== History ==
{{HistoryTable
{{HistoryTable
|{{MC/HistoryLine|java classic}}
|{{HistoryLine|java classic}}
|{{HistoryLine||rowspawn=2|0.0.16a|Added {{MC/Cmd|ban|link=none}} and {{MC/Cmd|banip|link=none}}.}}
|{{HistoryLine||rowspawn=2|0.0.16a|Added {{cmd|ban|link=none}} and {{cmd|banip|link=none}}.}}
|{{MC/HistoryLine|java indev}}
|{{HistoryLine|java indev}}
|{{MC/HistoryLine||0.31|Due to Indev's lack of support for servers, commands are no longer usable.}}
|{{HistoryLine||0.31|Due to Indev's lack of support for servers, commands are no longer usable.}}
|{{MC/HistoryLine|java alpha}}
|{{HistoryLine|java alpha}}
|{{HistoryLine||v1.0.16|{{MC/Cmd|banip|link=none}} has been renamed to {{MC/Cmd|ban-ip|link=none}}.
|{{HistoryLine||v1.0.16|{{cmd|banip|link=none}} has been renamed to {{cmd|ban-ip|link=none}}.
|{{MC/Cmd|ban|link=none}} and {{MC/Cmd|ban-ip|link=none}} are now usable again.
|{{cmd|ban|link=none}} and {{cmd|ban-ip|link=none}} are now usable again.
|Added {{MC/Cmd|banlist|link=none}}.}}
|Added {{cmd|banlist|link=none}}.}}
}}
}}


== See also ==
== See also ==
* [[Minecraft:Commands/whitelist]]
* [[Minecraft:Commands/whitelist]]
== References ==
{{reflist}}


== Navigation ==
== Navigation ==
{{MC/Navbox commands}}
{{Navbox commands}}


de:Befehl/ban
[[Minecraft:de:Befehl/ban]]
es:Comandos/ban
[[Minecraft:es:Comandos/ban]]
ja:コマンド/ban
[[Minecraft:ja:コマンド/ban]]
pt:Comandos/ban
[[Minecraft:pt:Comandos/ban]]
ru:Команды консоли/ban
[[Minecraft:ru:Команды консоли/ban]]
uk:Команди консолі/ban
[[Minecraft:uk:Команди консолі/ban]]
zh:命令/ban
[[Minecraft:zh:命令/ban]]

Latest revision as of 11:05, 7 May 2026

Template:Redirect Template:Exclusive

These commands add a single or multiple players into the Minecraft:server's ban list (or blacklist) by their game profile or IP address. A ban list is a list of players or IP addresses that are not allowed to connect to the server; this list supersede any whitelisting in place.

To remove players from the ban list, operator may use Template:Cmd or manually removing it from the banned-players.json.

ban

Template:Infobox command

Adds the player profile(s) into the server blacklist, which prevents anyone from connecting to the server with uuids of these profiles.

Syntax

ban <targets> [<reason>]

Arguments

Template:Argument

Specifies the player profile(s) to be added to the blacklist.
Template:Arg desc

Template:Argument

Message to display to the banned player, to other Minecraft:operators, and in the server logs. If unspecified, defaults to Banned by an operator.
Template:Arg desc

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table Template:Output table

ban-ip

Template:Infobox command

Adds an IP address to the blacklist. Adds the narrowly-specified address or address of the named online player into the server blacklist, preventing anyone from connecting to the server from that address.

Syntax

ban-ip <target> [<reason>]

Arguments

Template:Argument

Specifies the IP address to be added to the blacklist. Can also be a name of an online player, which represents the IP of that player.
Template:Arg desc
Since this, it is impossible to ban an IPv6 address in this way.<ref>Template:Bug</ref>

Template:Argument

Message to display to the banned player, to other Minecraft:operators, and in the server logs. If unspecified, defaults to Banned by an operator.
Template:Arg desc

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table Template:Output table

banlist

Template:Infobox command

Displays the server's blacklist.

Syntax

banlist [ips|players]

Result

Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table

banip

Template:Outdated feature Template:Infobox command

Bans a player by IP number. Cannot be undone in-game; Template:Cd must manually be changed.

The Classic equivalent of Template:Cmd.

Syntax

banip (<address>|<name>) [<reason>]

History

Template:HistoryTable

See also

References

Template:Reflist

Navigation

Template:Navbox commands

Minecraft:de:Befehl/ban Minecraft:es:Comandos/ban Minecraft:ja:コマンド/ban Minecraft:pt:Comandos/ban Minecraft:ru:Команды консоли/ban Minecraft:uk:Команди консолі/ban Minecraft:zh:命令/ban