Skip to content
WikilyWIKILY
All games23 Wikis · pick your game
Commands and cheatsAll commands

Switch game

23 Wikis · pick your game
/op

Command

/op

Makes one or more players server operators.

Syntax

/op <targets>

Arguments

ArgumentKind of valueWhat to type
<targets>Player profileThe player or players to make operators: a player name or a target selector.

Details

Permission level3: server operators with level 3 or higher
Works inDedicated servers only: the command does not exist in singleplayer or LAN worlds. Needs permission level 3 (admins): operators with level 3 or higher and the server console. Command blocks and functions cannot run it (their permission level is 2).
ResultReports "Made <player> a server operator" for each player who was not an operator yet. The number /execute store saves is the number of players who became operators.
Operator levelNew operators get the level set by op-permission-level in the server properties, which is 4 by default.
Already an operatorIf every chosen player is already an operator the command fails with "Nothing changed. The player is already an operator".

Examples

/op Steve

Makes Steve a server operator.

/op @p

Makes the nearest player a server operator.

Join the creator communityThe people who build the Minecraft Java Edition wiki are on our Discord. Ask questions or suggest pages.Join Discord (opens Discord in a new tab)