/whitelist
< Commands
/whitelist| Aliases |
|
|---|---|
| Permission level required |
|
| Restrictions |
Dedicated server |
{
"title": "<code>/whitelist</code>",
"rows": [
{
"field": "<code>/allowlist</code><sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as Bedrock Edition) only</span></i>]</sup>",
"label": "Aliases"
},
{
"field": "\n* 3 <sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Java Edition\">(link to Java Edition article, displayed as JE) only</span></i>]</sup>\n* 4 <sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Permission level article, displayed as Permission level<br>required)"
},
{
"field": "Dedicated server<br>(link to Options article, displayed as Cheat) only<sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Commands#Restrictions article, displayed as Restrictions)"
}
],
"invimages": [],
"images": []
}
Used to manage server whitelists.
In Java Edition, server operators can always connect when the whitelist is active, even if their profiles do not appear in the whitelist. In Bedrock Edition, players must be whitelisted regardless of operator status. The profiles of the whitelisted players are stored in the whitelist.json or allowlist.json configuration file.
Syntax
whitelist add <targets>(Java Edition)allowlist add <name: string>(Bedrock Edition)- Adds player profile(s) into the whitelist. The player does not need to be online.
whitelist list- Displays all player profiles in the whitelist.
whitelist off- Disables the server's use of a whitelist. Not implemented in Bedrock Edition.
whitelist on- Enables the server's use of a whitelist. Not implemented in Bedrock Edition.
whitelist reload- Reloads the list of player profiles in
whitelist.jsonorallowlist.json from disk (used whenwhitelist.jsonhas been modified outside of Minecraft).
- Reloads the list of player profiles in
whitelist remove <targets>(Java Edition)allowlist remove <name: string>(Bedrock Edition)- Removes player profile(s) from the whitelist. The player does not need to be online.
Arguments
JE: <targets>: game_profile
- Specifies the player profile(s) to be added into or removed from the whitelist.
- Specifies one or more game profiles (player profiles). Must be a player name (should be a real one if the server is in online mode) or a player-type target selector.
BE: name: string: basic_string
- Specifies the player name(s) to be added into or removed from the whitelist.
- Must be a string. And it must be a single word that has no space or a double-quoted string (When quoted,
\can be used to escape characters).
Result
| Command | Trigger | Java Edition |
|---|---|---|
| Any | The command is incomplete, or any argument is not specified correctly. | Unparseable |
/whitelist on | The whitelist is already enabled. | Failed |
/whitelist off | The whitelist is already disabled. | |
| The target selector fails to resolve to one or more online players. | ||
/whitelist add <targets> | There's no player profile newly added to the whitelist. | |
/whitelist remove <targets> | All specified profiles are not in the whitelist. | |
| Any | Otherwise | Successful |
Output
| Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
|---|---|---|---|---|---|
| Any | Java Edition | On fail | N/A | 0 | 0 |
/whitelist on | On success | N/A | 1 | 1 | |
/whitelist list | On success | N/A | 1 | the number of player profiles in the list. | |
/whitelist add <targets> | On success | N/A | 1 | the number of new player profiles added to the whitelist. | |
/whitelist remove <targets> | On success | N/A | 1 | the number of player profiles removed from the whitelist. |
History
| Java Edition Beta | |||||||
|---|---|---|---|---|---|---|---|
| 1.3 | Added /whitelist. | ||||||
| Bedrock Edition | |||||||
| 1.16.0 | release | Added /whitelist. | |||||
| 1.17.0 | beta 1.16.230.50 | Renamed to /allowlist. | |||||
| release | Reverted back to / | ||||||
| 1.18.10 | release | Renamed to /allowlist. | |||||