Minecraft Whitelist and Ban Commands: Control Who Joins Your Server
Java servers have built-in tools to limit who can join and to remove problem players. They work in the Console tab and in game for operators.
Whitelist
Run these commands:
- /whitelist on turns it on.
- /whitelist add name adds a player.
- /whitelist remove name removes a player.
- /whitelist list shows everyone listed.
- /whitelist reload reloads the file after manual edits.
- /whitelist off turns it off.
You can also set white-list=true in server.properties. Add enforce-whitelist=true so players who are not listed are kicked when the whitelist reloads or changes.
Bans
- /ban name reason bans a player by account.
- /ban-ip address bans an IP, and you can also use a player's name.
- /pardon name removes a ban.
- /pardon-ip address removes an IP ban.
- /banlist shows current bans.
- /kick name reason removes someone without banning them.
The files
The data is stored in whitelist.json, banned-players.json, banned-ips.json and ops.json in the server folder. They are JSON, so a missing comma can break them. Edit them only with the server stopped, or use commands where possible.
Offline mode warning
Whitelist entries use UUIDs. Servers with online-mode=false generate different UUIDs from names, so entries can stop working if you change modes or use a proxy. Keep online-mode consistent.
Bedrock
Bedrock uses allowlist commands, such as allowlist add and allowlist remove, with the setting allow-list in server.properties.
Tips
- A whitelist is the simplest protection against griefers on a small server.
- IP bans are easy to bypass with a VPN, so rely on the whitelist for strict control.
- Plugins like EssentialsX or dedicated moderation plugins can add temporary bans, if you need them.
Contact us on Discord for help.