Your friend just asked for OP on your server, and you want to know what that lets them do. This guide lists the Minecraft commands server owners use most, with the syntax, an example and the OP level each command needs. It covers Java Edition only. Commands give you direct control over your server without any plugins, from changing the time of day to banning a rule-breaker.
How to Use Commands in Minecraft
You can run commands two ways: in the game chat or through your server console.
In-game, open the chat window and type / followed by the command, then press Enter. Most commands need operator status at level 2 or higher. On a singleplayer world, cheats must be enabled. You can learn how to enable cheats in Minecraft if you need to turn that on.
In the server console, type the command without the / prefix and press Enter. On Apex, open the Apex server panel and go to Server Management > Console. Console commands always run with full permissions, regardless of op level.
Commands use two types of arguments:
<required>: must be included for the command to work[optional]: can be left out, and the command uses a default value
Operator Permission Levels
Not all commands are available to every player. Java Edition uses five permission levels, 0 to 4, and each level includes everything the lower levels can do:
- Level 0: Every player without operator status. They can run only the commands marked 0 in the table, such as
/help,/listand/msg - Level 1: Can bypass spawn protection
- Level 2: Can use most game commands (
/give,/tp,/gamemode,/time, etc.) - Level 3: Can use server management commands (
/ban,/kick,/whitelist,/op) - Level 4: Full access, including
/stop,/save-alland/perf
Grant operator status with the /op command from your server console. You can also add a player on the Operators screen of your Apex server panel: go to Server Configuration > Config Files > Operators. Operators are stored in ops.json on the server. To remove operator status, use /deop.
A new op gets the level set by op-permission-level in server.properties. The default is 4, and the setting accepts 0 to 4. Each entry in ops.json also has its own level value, so one player can sit at level 2 while another sits at level 3. Restart the server to apply changes to server.properties. The Minecraft Wiki has the full permission level rules.
Minecraft Commands List With OP Levels
The table below lists the Minecraft Java Edition commands server owners reach for most, matched to Java Edition 26.3. The OP Level column shows the lowest permission level that can run each command, taken from the Minecraft Wiki command list. Some commands include version notes where they were added in recent updates. If you host with us, our Minecraft server hosting plans give you the console and Operators screen used in this guide.
| Command | Description | Example | OP Level |
|---|---|---|---|
/help |
Shows a list of commands on the server, or information about a specific command. | /help weather |
0 |
/give <player> <item> [count] |
Gives a player any item. Use the full namespaced item ID (e.g. minecraft:iron_pickaxe). Leave count blank to give one. |
/give Steve minecraft:iron_pickaxe 1 |
2 |
/weather <clear|rain|thunder> [duration] |
Changes the weather. Valid types are clear, rain, and thunder. Snow falls automatically in cold biomes when weather is set to rain. |
/weather clear |
2 |
/gamemode <mode> [player] |
Changes your gamemode or another player’s. Valid modes: survival, creative, spectator, adventure. | /gamemode creative |
2 |
/summon <entity> [pos] |
Spawns an entity at your location or at specified coordinates. | /summon villager |
2 |
/tp [player] <target|x y z> |
Teleports you or a player to coordinates or to another player. You can also teleport to specific coordinates using x y z values. | /tp Steve Alex |
2 |
/time set <value> |
Sets the time of day. Use day, night, noon, or midnight, or a number of ticks (one full day is 24,000 ticks). |
/time set day |
2 |
/experience add <player> <amount> [points|levels] |
Adds experience to a player. Use levels to add full levels instead of raw XP points. Also works as /xp. |
/experience add Steve 1000 points |
2 |
/locate biome <biome> |
Finds the nearest biome of the specified type. This replaced /locatebiome in Java Edition 1.19. |
/locate biome plains |
2 |
/locate structure <structure> |
Finds the nearest structure of the specified type and reports its coordinates. In Java Edition 1.19 and later, /locate poi <poi> does the same for points of interest. |
/locate structure minecraft:ancient_city |
2 |
/msg <player> <message> |
Sends a private message to another player. Also works as /tell and /w. |
/msg Alex hello! |
0 |
/perf <start|stop> |
Starts a 10-second performance recording, or ends it early with stop. Saves a ZIP file to your server’s debug folder. Useful for diagnosing lag. It works on dedicated servers only, not in singleplayer. |
/perf start |
4 |
/save-all [flush] |
Saves player data at once and marks every chunk to be saved over time. Add flush to save all chunks at once, which pauses the server for a moment. This is not a full backup. Run it before a planned shutdown. |
/save-all flush |
4 |
/save-off |
Turns off automatic world saving. Turn it back on with /save-on when you finish copying or backing up the world files. |
/save-off |
4 |
/save-on |
Turns automatic world saving back on after /save-off. |
/save-on |
4 |
/stop |
Initiates a clean server shutdown, saving all data first. | /stop |
4 |
/worldborder <add|center|damage|get|set|warning> |
Creates or modifies the world border. Set the border size, center point, warning distance, and damage rate. See our guide on how to set up a world border in Minecraft. | /worldborder set 10000 |
2 |
/whitelist <add|remove|list|on|off|reload> |
Enables or disables the whitelist and manages the players on it. | /whitelist add Steve |
3 |
/gamerule <rule> [value] |
Changes a game rule for the world, so use it with caution. Java Edition 1.21.11 renamed the rules to snake_case: advance_time (was doDaylightCycle), keep_inventory (was keepInventory), and mob_griefing (was mobGriefing). Learn how to keep inventory on in Minecraft with this command, or browse every rule in our Minecraft gamerules guide. |
/gamerule advance_time false |
2 |
/ban <player> [reason] |
Adds a player to the server ban list by username. They cannot rejoin until pardoned. | /ban Steve Griefing |
3 |
/ban-ip <player|ip> [reason] |
Bans a player by IP address. Useful when a banned player has multiple accounts. | /ban-ip Steve |
3 |
/pardon <player> |
Removes a player from the ban list so they can rejoin. | /pardon Steve |
3 |
/pardon-ip <ip> |
Removes an IP address from the ban list. | /pardon-ip 203.0.113.5 |
3 |
/banlist [ips|players] |
Shows the server ban list. Add ips or players to show only one type. |
/banlist |
3 |
/clear [player] [item] [count] |
Clears items from your inventory, or from a player’s inventory if specified. Add an item ID to remove only that item. | /clear Steve |
2 |
/datapack <enable|disable|list> [<pack>] |
Controls the datapacks installed on your server. Enable, disable, or list installed packs. | /datapack enable seasons |
2 |
/op <player> |
Grants a player operator status. A player without op cannot run it, so nobody can op themselves in-game. An operator at level 3 or 4 can op other players in-game. The console and the Apex Operators screen always work. New ops get the level set by op-permission-level in server.properties (4 by default). |
/op Steve |
3 |
/deop <player> |
Removes operator status from a player. | /deop Steve |
3 |
/kick <player> [reason] |
Disconnects a player from the server without banning them. | /kick Steve AFK |
3 |
/kill [target] |
Kills the specified entity or player. Use @e[type=!player] to kill all non-player entities (pets and villagers included), or @a for all players. |
/kill @e[type=!player] |
2 |
/difficulty <peaceful|easy|normal|hard> |
Changes the server difficulty. Hard difficulty does not enable hardcore mode. Set hardcore in server.properties before the world is created. |
/difficulty peaceful |
2 |
/effect <give|clear> <target> [effect] [duration] [amplifier] |
Applies or removes a status effect from a player or entity. Duration is in seconds. Amplifier sets the effect level (0 = level 1). | /effect give Steve minecraft:speed 60 2 |
2 |
/enchant <target> <enchantment> [level] |
Applies an enchantment to the item the target is holding. The item must be enchantable and the enchantment must be compatible. | /enchant Steve minecraft:sharpness 5 |
2 |
/fill <from> <to> <block> |
Fills a region with the specified block type. Supports replace, keep, destroy, and outline modes. | /fill 0 64 0 10 74 10 minecraft:stone |
2 |
/clone <begin> <end> <destination> |
Copies a region of blocks to another location. Useful for duplicating structures. | /clone 0 64 0 10 74 10 20 64 20 |
2 |
/damage <target> <amount> [type] |
Deals damage to an entity. Added in Java Edition 1.19.4. Damage type is optional and defaults to generic damage. | /damage Steve 5 minecraft:generic |
2 |
/tick <query|rate|freeze|step|sprint|unfreeze> |
Controls the server tick rate. Added in Java Edition 1.20.3. Useful for debugging, performance testing, and speeding up time-sensitive processes. | /tick query |
3 |
/seed |
Displays your world’s current seed. Click the seed in chat to copy it to your clipboard. In singleplayer anyone can run it, but on a server it needs level 2. | /seed |
2 (0 in singleplayer) |
/setblock <pos> <block> [destroy|keep|replace] |
Changes a single block to another block. replace is the default mode. |
/setblock 100 64 100 minecraft:diamond_block |
2 |
/spawnpoint [targets] [pos] |
Sets where a player respawns after dying. Leave the player out to set your own spawn point. | /spawnpoint Steve 0 64 0 |
2 |
/setworldspawn [pos] |
Sets the world spawn, the point where new players first appear. | /setworldspawn 0 64 0 |
2 |
/list |
Lists the players currently online. Add uuids to show their UUIDs too. |
/list |
0 |
/say <message> |
Broadcasts a message to every player on the server. | /say Restart in five minutes |
2 |
/me <action> |
Shows an action message about you in chat. | /me waves |
0 |
/teammsg <message> |
Sends a message to everyone on your team. Also works as /tm. |
/teammsg Meet at spawn |
0 |
/tellraw <targets> <message> |
Sends a formatted JSON message to players. Good for server announcements with colors. | /tellraw @a {"text":"Welcome back","color":"gold"} |
2 |
/title <targets> <title|subtitle|actionbar|clear|reset|times> |
Shows a large title, subtitle, or action bar message on player screens. | /title @a title {"text":"Event starts now"} |
2 |
/execute <subcommand> |
Runs another command under changed conditions, such as a different executor, position, or dimension. Chain as, at, in, and if to build the context, then finish with run. |
/execute in minecraft:the_nether run tp Steve ~ ~ ~ |
2 |
/team <add|remove|join|leave|list|modify|empty> |
Creates and manages teams, which control things like name colors and friendly fire. | /team add Red |
2 |
/scoreboard <objectives|players> |
Creates and manages scoreboard objectives and the scores players hold. | /scoreboard objectives add kills playerKillCount |
2 |
/trigger <objective> [add|set <value>] |
Lets a player change their own score in a trigger objective that an operator has set up with the scoreboard commands. With no option, it adds 1. | /trigger help |
0 |
/random <value|roll> <range> |
Picks a random whole number in a range. Without a sequence name, any player can run it; a sequence name or /random reset needs level 2. |
/random roll 1..6 |
0 |
/forceload <add|remove> <from> [to] |
Keeps chunks loaded even when no player is nearby. Use /forceload remove all to release every forced chunk in the dimension, or /forceload query to list them. |
/forceload add 0 0 |
2 |
/reload |
Reloads loot tables, advancements, and functions from disk after you change a datapack. | /reload |
2 |
/setidletimeout <minutes> |
Sets how many minutes a player can sit idle before the server kicks them. | /setidletimeout 30 |
3 |
/transfer <hostname> [port] [players] |
Sends a player to another server. Added in Java Edition 1.20.5. The port defaults to 25565. | /transfer play.example.com 25565 Steve |
3 |
Commands Players Can Run Without OP
Players without operator status are level 0. These are the commands they can run on your server:
/helpshows help for commands./listshows who is online./msgsends a private message. It also works as/telland/w./meshows an action message in chat./teammsgmessages your team. It also works as/tm./triggeractivates a trigger objective that an operator has set up./randompicks a random number in a range, such as/random roll 1..6.
The other commands in the table need operator status, and most game commands need level 2. Commands added by plugins such as EssentialsX follow the plugin’s own permissions instead of these levels.
Command Guides for Server Owners
Each guide below goes deeper on one job from the table.
- Keep inventory on in Minecraft so players keep their items after dying.
- Teleport to coordinates with
/tp, including the Nether and End. - Change game rules such as day length, mob griefing, and weather.
- Set up a world border to keep players inside a fixed area.
- Enable cheats when you need commands in a singleplayer world.
- Op yourself when you first take over a new server.
- Add a datapack to extend what your commands can change.
Common Issues
You Do Not Have Permission to Use This Command
This error appears when you are not opped on the server, or your op level is too low for the command you tried. Check the OP Level column to see what the command needs. Follow our guide on how to op yourself to gain operator access, or ask the server owner to grant it. Commands like /op need level 3 and /stop needs level 4, so a level 2 operator sees this error when running them in-game. The server console always has full permissions.
Invalid Argument or Syntax Error
A syntax error usually means a typo or a wrong argument format. Check the command table above and confirm you have the right arguments in the right order. On Java Edition, pressing Tab in the chat window autocompletes command arguments and cycles through valid options. On servers running EssentialsX or similar plugins, some commands may have slightly different syntax.
Command Not Found
If a command listed here does not work on your server, check your Minecraft version. Commands like /locate biome, /damage, /tick, and /transfer were added in specific versions (1.19, 1.19.4, 1.20.3, and 1.20.5 respectively). If your server is running an older version, those commands will not be available. Game rule names changed in 1.21.11, so use the snake_case names such as keep_inventory on 1.21.11 and later, and the older names such as keepInventory on earlier versions. Also check that you are running vanilla Minecraft and not a modpack that may have removed or replaced certain commands.
FAQ
Yes. Players without operator status sit at level 0 and can run /help, /list, /msg, /tell, /w, /me, /teammsg, /tm, /trigger, and /random (without a sequence name). Most other commands need level 2 or higher.
Level 3 covers /ban, /kick, and /whitelist. It also covers /op, and new ops get the level in op-permission-level, which is 4 by default. Give level 3 only to people you trust with that. Level 2 is enough for builders who need /give, /tp, and /gamemode.
No. A player without operator status can’t run /op. Type op followed by your username in the Apex console, or add your name on the Operators screen. Once you hold level 3 or 4, you can op other players in-game.
Open the Apex server panel, go to Server Management > Console, type the command without the / prefix, and press Enter. Console commands always run with full permissions.



























