
Command
/whitelist
Manages the server whitelist, the list of players who are allowed to join when the whitelist is turned on.
| /whitelist (add <targets>|remove <targets>) |
| /whitelist (list|off|on|reload) |
| Argument | Kind of value | What to type |
|---|---|---|
| <targets> | Player profile | The players to add or remove, given as player names or a selector. |
| Permission level | 3: server operators with level 3 or higher |
| Works in | Exists only on dedicated multiplayer servers, not in singleplayer or LAN worlds. Requires permission level 3 (admins): server operators of level 3 or higher and the server console. Command blocks and functions run at level 2 and cannot use it. |
| Result | add and remove report each player added or removed and return how many players changed. list reports the whitelisted names and returns how many there are. on, off and reload report the change and return 1. |
| on and off | /whitelist on turns the whitelist on and /whitelist off turns it off. Each fails if the whitelist is already in that state. |
| add and remove | /whitelist add <targets> and /whitelist remove <targets> change the list. add fails with "Player is already whitelisted" and remove fails with "Player is not whitelisted" if none of the given players changed. |
| list | /whitelist list shows every whitelisted player, or "There are no whitelisted players". |
| reload | /whitelist reload reads the whitelist again from the server's files. |
| Kicking players | After on, remove and reload, online players who are not on the list are disconnected, but only when the whitelist is on and the server is set to enforce the whitelist. |
/whitelist add SteveAdds the player Steve to the whitelist.
/whitelist onTurns the whitelist on so that only listed players can join.
/whitelist listShows all whitelisted players.

