Whitelist is 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[Bedrock Edition only] configuration file. In Minecraft Bedrock version 1.18.10 the whitelist was renamed to allowlist. The old file and command still exist, but have been deprecated.
Syntax
whitelist add <_targets>
(Java Edition)allowlist add <name: string>
(Bedrock Edition)- Adds the player profile(s) to the whitelist. The player does not need to be online.
whitelist list
(Java Edition)allowlist list
(Bedrock Edition)- Displays all player profiles in the whitelist.
whitelist off
(Java Edition)allowlist off
(Bedrock Edition)- Disables the server's use of a whitelist.
whitelist on
(Java Edition)allowlist on
(Bedrock Edition)- Enables the server's use of a whitelist.
whitelist reload
(Java Edition)allowlist reload
(Bedrock Edition)- Reloads the list of player profiles in
whitelist.json
from disk (used whenwhitelist.json
has been modified outside of Minecraft).
- Reloads the list of player profiles in
whitelist remove <_targets>
(Java Edition)allowlist remove <name: string>
(Bedrock Edition)- Removes the player profile(s) from the whitelist. The player does not need to be online.
enable-command-block=true
Arguments
JE: <_targets>
: game_profile
- Specifies the player profile(s) to be added to or removed from the whitelist.
- Must be a collection of game profiles (player profiles), which can be a player name (must 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 to or removed from the whitelist.
- Must be a string. And it must be a single word that has no space or a quoted string.
Result
Command | Trigger | Java Edition |
---|---|---|
any | the arguments are 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 new new player profile added to the whitelist | |
/whitelist remove <_targets> | all specified profiles is 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 players 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 /whitelist | ||||
1.18.10 | release | Renamed to /allowlist . |