Minecraft Wiki

The Minecraft Wiki is no longer considered as official by Microsoft and therefore several changes are required to be made, including to the wiki's logo. Please read this announcement for more information.

READ MORE

Minecraft Wiki
Advertisement
op
Permission level
required

3‌[JE only]
2‌[BE only]

Restrictions

No command blocks

Grants operator status to a player.

Syntax[]

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

Arguments[]

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

Specified the player to be granted op.
In Java Edition, must be a collection of game profiles (player profiles), which can be a player name (must 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. And the target selector must be of player type.

Result[]

CommandTriggerJava EditionBedrock Edition
anythe arguments are not specified correctly Unparseable Failed
<targets> fails to resolve to one or more player profiles Failed N/A
player: target fails to resolve to one or more online players N/A Failed
all specified players are already op or higher. Failed
On successGrants target(s) operator status.

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.
Pocket Edition Alpha
v0.16.0build 1Added /op.
Advertisement