Direct answer

Use /whitelist on, then /whitelist add PlayerName to restrict who can join a Java server. The console runs the same commands without /.

Recommended procedure

  1. Enter /whitelist on to enable the allowlist.
  2. Run /whitelist add PlayerName for every trusted player.
  3. Run /whitelist list to inspect entries.
  4. Use /whitelist remove PlayerName to revoke access.
  5. If you edit the allowlist file outside Minecraft, follow your software’s documented reload procedure; prefer commands for normal changes.

Why this matters

Whitelisting is an access control, not a replacement for online authentication, secure operator accounts, or a proxy firewall. A wrongly configured proxy can bypass your intended backend access policy.

How to verify the result

Check /whitelist list, then attempt connection using a test account that is not listed. Check hosting-panel/proxy configurations if the allowlist is not enforced.

Version and compatibility notes

Commands shown are for Java dedicated servers. Some plugins replace or extend the allowlist; confirm which system handles joins before editing external files.

Official references

Was this article helpful?
Help us improve this article

Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.

What could we improve?
Do not include passwords, server IPs, or other private information.0 / 1000