DGuard

Operators and the whitelist: who may do what on a server

OP is vanilla's admin right, with levels from 1 to 4; the whitelist is the list of players the server lets in. Both live in JSON files next to the server. Here's what each level grants, how to lock a server with a whitelist, and why moderators are better off with plugin permissions than OP.

The DGuard team5 min read

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

LevelWhat it grantsExample commands
0A regular player: can turn on the TPS graph in the debug screenlist, msg, help
1Can build inside spawn protection—
2Game and world commands, target selectorsgamemode, gamerule, tp, give, time, weather
3Multiplayer player managementkick, ban, pardon, op, deop, whitelist
4Every command, server management includedstop, save-all, save-off
From the Minecraft Wiki: permission levels and the Java Edition command list

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. 1

    From the console

    op Steve to give, deop Steve to remove. In game the same commands need level 3.

  2. 2

    The default level

    A new operator gets the level from op-permission-level in server.properties, 4 by default. Set 3 or 2 if OP goes to anyone besides the owner.

  3. 3

    An exact level for one player

    Stop the server and change the player's level field in ops.json; the bypassesPlayerLimit field there decides whether they can join a full server.

ops.json — one level-3 operator who can join even a full server
[
  {
    "uuid": "069a79f4-44e9-4726-a5be-fca90e38aaf5",
    "name": "Notch",
    "level": 3,
    "bypassesPlayerLimit": true
  }
]

The whitelist

CommandWhat it does
whitelist on / whitelist offTurn the whitelist on and off
whitelist add <name> / whitelist remove <name>Add and remove a player
whitelist listShow the list
whitelist reloadRe-read whitelist.json after editing it by hand
All commands are level 3
  • 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=true the server kicks anyone not on the list when it reloads it.
  • On by default since 26.3. On a fresh server white-list defaults to true: 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

FileWhat it holds
ops.jsonOperators: uuid, name, level, bypassesPlayerLimit
whitelist.jsonThe whitelist: each player's uuid and name
banned-players.jsonName bans: who, by whom, when, until when, the reason
banned-ips.jsonIP 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

All sections

Run the best anticheat for modern Minecraft

DGuard catches all 47 kinds of cheats in our comparison — the closest rival, Intave, has 27. Full protection on every plan, free up to 30 players online.