minecraft.wiki-mirror/wiki_backup/whitelist.txt
2024-12-24 06:17:34 -05:00

86 lines
3.6 KiB
Text

{{redirect|Whitelist|the file specifying whitelisted players|whitelist.json}}
{{Infobox command
|name=whitelist
|alias=<code>/allowlist</code>{{only|be}}
|oplevel=
* 3 {{only|java|short=1}}
* 4 {{only|bedrock|short=1}}
|others=[[Options|Cheat]] only{{only|bedrock|short=1}}
|serveronly=y
}}
Used to manage [[server]] whitelists.
{{IN|java}}, server operators can ''always'' connect when the whitelist is active, even if their profiles do not appear in the whitelist. {{IN|bedrock}}, players ''must'' be whitelisted regardless of operator status. The profiles of the whitelisted players are stored in the [[whitelist.json]] or allowlist.json{{only|bedrock}} configuration file.
==Syntax==
:<code>whitelist add <targets></code> ({{el|je}})
:<code>whitelist add <name: string></code> ({{el|be}})
:: Adds player profile(s) into the whitelist. The player does not need to be online.
:<code>whitelist list</code>
::Displays all player profiles in the whitelist.
:<code>whitelist off</code>
::Disables the server's use of a whitelist. Not implemented {{in|be}}.
:<code>whitelist on</code>
::Enables the server's use of a whitelist. Not implemented {{in|be}}.
:<code>whitelist reload</code>
::Reloads the list of player profiles in <code>whitelist.json</code> or <code>allowlist.json</code>{{only|bedrock}} from disk (used when <code>whitelist.json</code> has been modified outside of ''Minecraft'').
:<code>whitelist remove <targets></code> ({{el|je}})
:<code>allowlist remove <name: string></code> ({{el|be}})
::Removes player profile(s) from the whitelist. The player does not need to be online.
==Arguments==
{{el|je|short=1}}: {{argument|targets|game_profile}}
:Specifies the player profile(s) to be added into or removed from the whitelist.
:{{arg desc|je=game_profile}}
{{el|be|short=1}}: {{argument|be=1|name: string|basic_string}}
:Specifies the player name(s) to be added into or removed from the whitelist.
:{{arg desc|be=string}}
== Result==
{{Result table|onlyje=1}}
{{Result table|The command is incomplete, or any argument is not specified correctly.|unparseable}}
{{Result table|cmd=/whitelist on|The whitelist is already enabled.|fail}}
{{Result table|cmd=/whitelist off|The whitelist is already disabled.}}
{{Result table|The target selector fails to resolve to one or more online players.}}
{{Result table|cmd=/whitelist add <targets>|There's no player profile newly added to the whitelist.}}
{{Result table|cmd=/whitelist remove <targets>|All specified profiles are not in the whitelist.}}
{{Result table|cmd=|succeed}}
{{Result table}}
== Output ==
{{Output table}}
{{Output table|edition=je|On fail|N/A|0|0}}
{{Output table|cmd=/whitelist on<br>/whitelist off<br>/whitelist reload|On success|N/A|1|1}}
{{Output table|cmd=/whitelist list|On success|N/A|1|the number of player profiles in the list.}}
{{Output table|cmd=/whitelist add <targets>|On success|N/A|1|the number of new player profiles added to the whitelist.}}
{{Output table|cmd=/whitelist remove <targets>|On success|N/A|1|the number of player profiles removed from the whitelist.}}
{{Output table}}
== History ==
{{HistoryTable
|{{HistoryLine|Java Beta}}
|{{HistoryLine||1.3|Added {{cmd|link=none|whitelist}}.}}
|{{HistoryLine|bedrock}}
|{{HistoryLine||1.16.0|dev=release|Added {{cmd|whitelist|link=none}}.}}
|{{HistoryLine||1.17.0|dev=beta 1.16.230.50|Renamed to {{cmd|allowlist|link=none}}.}}
|{{HistoryLine|||dev=release|Reverted back to {{cmd|whitelist}}}}
|{{HistoryLine||1.18.10|dev=release|Renamed to {{cmd|allowlist|link=none}}.}}
}}
== Navigation ==
{{Navbox commands}}
[[de:Befehl/whitelist]]
[[ja:コマンド/whitelist]]
[[pt:Comandos/whitelist]]
[[ru:Команды консоли/whitelist]]
[[zh:命令/whitelist]]