Updated:
Give and remove operator rights
# In game (run by an operator)
/op PlayerName
/deop PlayerName
# In the server console (no slash needed)
op PlayerName
The first operator has to be added from the server console. Operators are saved in ops.json in the server folder.
Permission levels
| Level | What it allows |
|---|---|
| 1 | Build inside spawn protection |
| 2 | Cheat commands such as /gamemode, /give and /tp, and editing command blocks |
| 3 | Player management: /kick, /ban, /op, /deop |
| 4 | Server control such as /stop; every command |
/op grants the level set by op-permission-level in server.properties (default 4). To give different people different levels, stop the server and edit level in ops.json. Level 2 is a sensible start for friends.
Kick a player
/kick PlayerName Breaking the rules
Kicking only disconnects them, and they can rejoin straight away. Use it as a warning and ban repeat offenders. The reason appears on their screen.
Ban and unban
/ban PlayerName Griefing builds
/pardon PlayerName
/banlist players
/banblocks that account and kicks them if they are online./pardonlifts the ban./banlistlists bans; addipsfor IP bans.
Bans are stored in banned-players.json with the date and reason.
When they come back on another account (IP ban)
/ban-ip PlayerName
/pardon-ip 203.0.113.5
/ban-ip blocks every connection from that player's IP address. It can also block other people on the same home or school network, and mobile IPs change often, so it is not watertight. For persistent griefers, switch to a whitelist so only approved players can join.
Bedrock Edition
- /op, /deop and /kick exist on Bedrock too.
- Bedrock has no /ban. Dedicated servers use the allowlist to control who can join.
- In a world shared with friends, the pause menu player list lets you set Visitor, Member or Operator.
Common problems
- "You do not have permission": kick and ban need level 3 or higher.
- "Unknown command" in the console: type without the slash.
- Fails for someone offline: check the spelling; a name that has never joined may not resolve.
- A banned player keeps returning: they are using another account. Use a whitelist.
Common questions
- LAN worlds? Turning on Allow Cheats when opening to LAN lets the host use commands, but you cannot give operator rights to guests.
- Op everyone? Not recommended. Level 3 and above can ban others and remove operators.
- Where are ban reasons kept? In
banned-players.json.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.