Skip to content
WikilyWIKILY
All games23 Wikis · pick your game
Commands and cheatsAll commands

Switch game

23 Wikis · pick your game
/whitelist

Command

/whitelist

Manages the server whitelist, the list of players who are allowed to join when the whitelist is turned on.

Syntax

/whitelist (add <targets>|remove <targets>)
/whitelist (list|off|on|reload)

Arguments

ArgumentKind of valueWhat to type
<targets>Player profileThe players to add or remove, given as player names or a selector.

Details

Permission level3: server operators with level 3 or higher
Works inExists 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.
Resultadd 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 playersAfter 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.

Examples

/whitelist add Steve

Adds the player Steve to the whitelist.

/whitelist on

Turns the whitelist on so that only listed players can join.

/whitelist list

Shows all whitelisted players.

Join the creator communityThe people who build the Minecraft Java Edition wiki are on our Discord. Ask questions or suggest pages.Join Discord (opens Discord in a new tab)