Giving yourself operator (op) status makes you a server admin, unlocking cheat and moderation commands like /gamemode, /give, /tp and /ban that normal players cannot use.
What op status means
An operator is a trusted admin on your Minecraft Java server. Ops bypass spawn protection, can run restricted commands, and by default can use the moderation tools that keep a server tidy. On a fresh server nobody is an op yet, so the first thing most owners do is op their own account.
Op yourself from the Console
The quickest way is the Console tab, which has a command input box at the bottom.
- Start your server and wait for it to finish loading.
- Open the Console tab.
- In the input box, type op YourUsername (use your exact in-game name, it is case sensitive) and press Enter.
- You will see a line like Made YourUsername a server operator.
Notice you do not type a slash in the Console. The / is only used when you run a command from inside the game as a player.
Handy admin commands
Once you are op, join the server and try these, typed in the in-game chat with a leading /:
- /gamemode creative YourUsername - switch your mode. survival, adventure and spectator also work.
- /give YourUsername minecraft:diamond 64 - give items.
- /tp YourUsername 100 64 -200 - teleport to coordinates, or /tp PlayerA PlayerB.
- /time set day and /weather clear - control time and weather.
- /difficulty hard - change difficulty on the fly.
- /kick, /ban and /pardon - moderate players.
- /gamerule keepInventory true - change world rules.
Running commands: chat vs Console
You can run most of these two ways. In-game chat needs the slash (/give ...). The Console input runs the same command without the slash (give ...) and always acts as the server, which is useful for opping or banning someone even when you are not online.
Op levels and removing op
Op has four permission levels (1 to 4). The default is set by op-permission-level in server.properties, and level 4 is full access. To remove someone, run deop YourUsername from the Console.
Command blocks
If you want commands to run from redstone contraptions, set enable-command-block=true in server.properties and restart. Only ops can place and edit command blocks.
Take a Backups snapshot before hosting a public build so a rogue command cannot cost you your world.
Still stuck? Jump into our Discord at discord.gg/GuavaHost and the team will help you out.