/op

/op
Permission level
required
  • 3 ‌
  • 2 ‌
Restrictions

Dedicated server only‌

Grants operator status to the player(s).

In Java Edition, adds the players into the ops.json file with the default op permission level specified by op-permission-level in the server.properties.

In Bedrock Edition, changes the player's permission in the "Player Permission" screen to the "Operator" option . In dedicated servers, it is also recorded in permissions.json. The permissions.json file can be reloaded with /permission command.

Syntax

  • Java Edition
op <targets>
  • Bedrock Edition
op <player: target>

Arguments

JE<targets>: game_profile
BE: player: target: CommandSelector<Player>

Specifies the player to be granted op.
In Java Edition:
Specifies one or more game profiles (player profiles). Must be a player name (should be a real one if the server is in online mode) or a player-type target selector.
In Bedrock Edition:
Must be a player name or a target selector.

Result

CommandTriggerJava EditionBedrock Edition
AnyThe command is incomplete, or any argument is not specified correctly. Unparseable Unparseable
<targets> fails to resolve to one or more player profiles. Failed N/A
player: target is a target selector that is not in player type. N/A Failed
player: target fails to resolve to one or more online players.
All the specified players are already an op or higher. Failed
OtherwiseSuccessful

Output

CommandEditionSituationSuccess Count/execute store success .../execute store result ...
AnyJava EditionOn failN/A00
On successN/A1the number of players who are newly granted op

History

Java Edition Classic
0.0.15a (Multiplayer Test 3)Added /op.
Java Edition Indev
0.31Removed all commands.
Java Edition Alpha
v1.0.16Re-added /op.
Java Edition
1.1317w45aNow allows target selectors besides names.
Pocket Edition Alpha
v0.16.0build 1Added /op.

Example

  • Give Steve OP:/op Steve

Navigation