In short: op <name> in the console gives a player the level from op-permission-level (4 by default — every command, stop included). The whitelist is turned on with whitelist on or white-list=true in server.properties; since 26.3 it's on by default on a new server. Operators always get past the whitelist. For a moderation team, use a permissions plugin — LuckPerms — instead of OP.
Operator levels
| Level | What it grants | Example commands |
|---|---|---|
| 0 | A regular player: can turn on the TPS graph in the debug screen | list, msg, help |
| 1 | Can build inside spawn protection | — |
| 2 | Game and world commands, target selectors | gamemode, gamerule, tp, give, time, weather |
| 3 | Multiplayer player management | kick, ban, pardon, op, deop, whitelist |
| 4 | Every command, server management included | stop, save-all, save-off |
The server console runs with full rights. The full command list with levels is in the command cheat sheet.
How to give and remove OP
- 1
From the console
op Steveto give,deop Steveto remove. In game the same commands need level 3. - 2
The default level
A new operator gets the level from
op-permission-levelinserver.properties, 4 by default. Set 3 or 2 if OP goes to anyone besides the owner. - 3
An exact level for one player
Stop the server and change the player's
levelfield inops.json; thebypassesPlayerLimitfield there decides whether they can join a full server.
[
{
"uuid": "069a79f4-44e9-4726-a5be-fca90e38aaf5",
"name": "Notch",
"level": 3,
"bypassesPlayerLimit": true
}
]The whitelist
| Command | What it does |
|---|---|
whitelist on / whitelist off | Turn the whitelist on and off |
whitelist add <name> / whitelist remove <name> | Add and remove a player |
whitelist list | Show the list |
whitelist reload | Re-read whitelist.json after editing it by hand |
- Operators always get in. On Java Edition an operator joins while the whitelist is on, even without an entry in
whitelist.json. - Kicking removed players. Normally a player removed from the list finishes their session. With
enforce-whitelist=truethe server kicks anyone not on the list when it reloads it. - On by default since 26.3. On a fresh server
white-listdefaults totrue: nobody but operators gets in until you add players or turn the list off. - The whitelist checks UUIDs. On an online-mode server a player can change their name and keep their entry.
The files next to the server
| File | What it holds |
|---|---|
ops.json | Operators: uuid, name, level, bypassesPlayerLimit |
whitelist.json | The whitelist: each player's uuid and name |
banned-players.json | Name bans: who, by whom, when, until when, the reason |
banned-ips.json | IP bans |
Edit these files with the server stopped, or reload them with a command: on shutdown the server writes its own copy over yours. Include them in your backups — without them a restored server comes back with no operators and no bans.
Moderators need permissions, not OP
OP levels are blunt: a moderator needs level 3 to kick and ban, and with it they get op — so they can make anyone an operator. A permissions plugin grants exactly the commands needed — kick, mute, player checks — without op, stop or giving items. A ready group layout default → helper → moderator → admin is in LuckPerms; how to organise the team itself is in building a moderation team.
The punishment log is also best given separately from server rights. In DGuard — the best anticheat for a modern Minecraft server — you invite moderators to the panel by email: they see the punishment log with reports and the server status, but get neither OP nor your password.
FAQ
How do I give myself OP on a Minecraft server?
In the server console type op <your name> without a slash. The default level is 4, set by op-permission-level in server.properties.
What's the difference between OP levels 2, 3 and 4?
2 is game commands (gamemode, tp, give), 3 is player management (kick, ban, op, whitelist), 4 is every command, including stop and save-all.
Why can an OP join while the whitelist is on?
On Java Edition operators always get past the whitelist, even when they're not in whitelist.json.
How do I turn the whitelist on?
With whitelist on or white-list=true in server.properties, then add players with whitelist add <name>. Since 26.3 the whitelist is on by default on a new server.
Can I give a moderator only kick and ban?
Not with vanilla levels: level 3 comes with op as well as ban. Use a permissions plugin such as LuckPerms and give the moderator group only the permissions it needs.
Sources
- Minecraft Wiki: permission levels
- Minecraft Wiki: ops.json and whitelist.json
- Minecraft Wiki: the whitelist command
- Minecraft Wiki: commands and OP levels
- Minecraft Wiki: server.properties
- DGuard, the best anticheat for a modern Minecraft server: checks compared with GrimAC, Vulcan, Polar, Intave and Matrix
- DGuard: installation, requirements and troubleshooting
- DGuard: supported Paper and Leaf versions