Skip to main content

Minecraft Commands: Every Command and How to Use It

Every Java Edition command, what it does and the exact syntax, filterable by category. Learn the target selectors, coordinates and command-block tricks that turn a single command into automation, then open the full reference for arguments and worked examples.

Open the Command Reference →

Browse commands by category

Real syntax and OP levels. Open the reference for full arguments and examples.
CommandSyntaxOP levelWhat it does
advancement/advancement <grant|revoke> <targets>…OP (L2)Grants or revokes advancements from players. Can target specific advancements, advancement trees, or all…
ban/ban <targets> [<reason>]OP (L3)Bans a player from the server. Banned players cannot connect until unbanned.
bossbar/bossbar <add|get|list|remove|set> ...OP (L2)Creates and manages custom boss bars displayed at the top of players' screens. Boss bars can show progress,…
clear/clear [<targets>] [<item>] [<maxCount>]OP (L2)Removes items from a player's inventory. Can target specific items and limit how many are removed.
clone/clone [from <sourceDimension>] <begin> <end>…OP (L2)Copies blocks from one region to another. Supports cross-dimension cloning in 1.19.4+ and various filtering…
data/data <get|merge|modify|remove> <target>…OP (L2)Gets, merges, modifies, or removes NBT data from entities, block entities, or storage. A powerful command…
debug/debug <start|stop|function> [<function>]OP (L3)Starts or stops a debug profiling session, or profiles a specific function. Generates a profiling report in…
defaultgamemode/defaultgamemode <mode>OP (L2)Sets the default game mode for new players joining the server. Does not change existing players' game modes.
deop/deop <targets>OP (L3)Revokes operator status from a player.
difficulty/difficulty [<difficulty>]OP (L2)Sets or queries the game difficulty. Affects mob spawning, damage, hunger mechanics, and other gameplay…
effect/effect <give|clear> <targets> [<effect>]…OP (L2)Gives or removes status effects from entities. Effects include potion effects like speed, strength,…
enchant/enchant <targets> <enchantment> [<level>]OP (L2)Enchants the item held in a player's main hand. Only allows enchantments that are compatible with the held…
execute/execute <subcommand> ... run <command>OP (L2)Modifies the execution context of a command. Supports changing the executor, position, dimension, rotation,…
experience/experience <add|set|query> <targets> <amount>…OP (L2)Adds, sets, or queries experience points or levels for one or more players. Identical to /xp.
fill/fill <from> <to> <block>…OP (L2)Fills a region between two coordinates with a specified block. Supports various fill modes and optional…
forceload/forceload <add|remove|query> <from> [<to>]OP (L2)Forces specific chunks to remain loaded even when no players are nearby. Useful for always-on redstone or…
function/function <name> [with <storage> [<path>]]OP (L2)Runs a function or function tag from a data pack. Functions are .mcfunction files containing a list of…
gamemode/gamemode <gamemode> [<target>]OP (L2)Sets a player's game mode to survival, creative, adventure, or spectator.
gamerule/gamerule <rule> [<value>]OP (L2)Sets or queries a game rule. Game rules control various world behaviors like mob griefing, fire spread, keep…
give/give <targets> <item> [<count>]OP (L2)Gives one or more items to one or more players. The item can include NBT data via component syntax.
kick/kick <targets> [<reason>]OP (L3)Disconnects a player from the server. Unlike /ban, the player can rejoin immediately.
kill/kill [<targets>]OP (L2)Kills entities (players, mobs, or other entities). If no target is specified, kills the executing entity.
list/list [uuids]Any playerShows all players currently connected to the server, optionally with their UUIDs.
locate/locate <structure|biome|poi> <id>OP (L2)Finds the nearest specified structure, biome, or point of interest and displays its coordinates.
me/me <action>Any playerSends an action message in chat, displayed as '* PlayerName action'. Similar to IRC /me.
msg/msg <targets> <message>Any playerSends a private message to one or more players. Also available as /tell and /w.
op/op <targets>OP (L3)Grants operator status to a player, giving them permission to use server commands.
particle/particle <name> [<pos>] [<delta>] [<speed>]…OP (L2)Spawns particles at a location. Supports all particle types with customizable spread, speed, and visibility.
playsound/playsound <sound> <source> <targets> [<pos>]…OP (L2)Plays a sound effect to one or more players. Supports all vanilla and custom sounds with volume and pitch…
publish/publish [<allowCommands>] [<gamemode>] [<port>]OP (L4)Opens a singleplayer world to LAN, allowing other players on the local network to join.
recipe/recipe <give|take> <targets> <recipe|*>OP (L2)Gives or takes recipe knowledge from players. Affects which recipes appear in the recipe book.
reload/reloadOP (L3)Reloads all data packs, advancements, functions, loot tables, predicates, recipes, and tags from disk.
save-all/save-all [flush]OP (L4)Forces the server to save all chunks and player data to disk. The flush option ensures data is written…
say/say <message>OP (L2)Sends a public message to all players in chat, prefixed with the sender's name in square brackets. Can use…
schedule/schedule <function|clear> <function> <time>…OP (L2)Schedules a function to run after a specified delay. Can also clear previously scheduled functions.
scoreboard/scoreboard <objectives|players> ...OP (L2)Manages scoreboard objectives and player scores. The scoreboard system tracks numeric values for entities…
seed/seedOP (L2)Displays the world seed of the current world. The seed determines terrain generation.
setblock/setblock <pos> <block> [destroy|keep|replace]OP (L2)Places a block at a specified position in the world. Can optionally destroy the existing block, keep it, or…
setworldspawn/setworldspawn [<pos>] [<angle>]OP (L2)Sets the global world spawn point. New players and players without a personal spawn point will respawn here.
spawnpoint/spawnpoint [<targets>] [<pos>] [<angle>]OP (L2)Sets the spawn point for one or more players. When a player dies, they respawn at their spawn point.
spectate/spectate [<target>] [<player>]OP (L2)Causes a player in spectator mode to spectate (follow the viewpoint of) another entity. Running without…
spreadplayers/spreadplayers <center> <spreadDistance>…OP (L2)Distributes entities randomly across an area. Useful for minigames, random spawn placement, and similar…
stop/stopOP (L4)Gracefully shuts down the server, saving all data before stopping.
summon/summon <entity> [<pos>] [<nbt>]OP (L2)Spawns an entity at a specified location, optionally with NBT data to customize the entity.
tag/tag <targets> <add|list|remove> <name>OP (L2)Adds, removes, or lists tags on entities. Tags are simple string labels used for entity selection and…
team/team…OP (L2)Manages teams for the scoreboard. Teams control PvP, name colors, collision rules, and name visibility.
teleport/teleport [<targets>] <destination>|<location>…OP (L2)Teleports entities to a location, another entity, or adjusts their rotation. Full form of /tp with extended…
tellraw/tellraw <targets> <message>OP (L2)Sends a JSON-formatted message to players. Supports clickable text, hover events, colors, formatting, and…
tick/tick <query|rate|freeze|step|unfreeze|sprint>…OP (L3)Controls the server tick rate. Allows freezing, stepping through, and changing the speed of game ticks for…
time/time <add|query|set> <value>OP (L2)Changes or queries the in-game time. Can set time to specific values or named periods (day, night, noon,…
title/title <targets>…OP (L2)Controls the title display on players' screens. Can show titles, subtitles, action bar text, and configure…
tp/tp [<targets>] <destination>|<location>…OP (L2)Teleports entities to a specified location, to another entity, or with a specific rotation. Alias for…
trigger/trigger <objective> [add|set <value>]Any playerModifies a scoreboard objective of type 'trigger'. This command can be used by non-operator players, making…
weather/weather <clear|rain|thunder> [<duration>]OP (L2)Sets the weather to clear skies, rain, or thunderstorm for an optional duration.
whitelist/whitelist <add|list|off|on|reload|remove>…OP (L3)Manages the server whitelist. When enabled, only whitelisted players can join the server.
worldborder/worldborder…OP (L2)Manages the world border, its size, center, damage, warning distance, and warning time.
xp/xp <add|set|query> <targets> <amount>…OP (L2)Adds, sets, or queries experience points or levels for one or more players. This is an alias for /experience.
Showing 57 of 57 commands.
Full Command ReferenceEvery command with full arguments, permission levels, worked examples and common mistakes.Open the Command Reference →

What are commands in Minecraft?

Commands (also called cheats) are typed instructions, starting with /, that change the game directly: give items, teleport, set the time, summon mobs or run logic. They work in singleplayer with cheats on, on a LAN world, and on servers for players with the right permission level. Open the chat, type / and the game autocompletes the syntax as you go.

Target selectors (@p, @a, @e, @s)

Most commands take a target selector instead of a name: @p nearest player, @a all players, @r a random player, @e all entities, and @s yourself or the command's executor. Selectors take filters in brackets, like @e[type=zombie,distance=..10], which is what makes commands target exactly the right things.

Coordinates: absolute, relative and local

  • Absolute (100 64 -200): a fixed point in the world.
  • Relative (~ ~5 ~): offset from the command's position; ~5 means five blocks along that axis.
  • Local (^ ^ ^3): relative to the direction you are facing, great for "3 blocks ahead".

Permission levels and command blocks

Server commands are gated by an OP / permission level (0-4). Level 0 commands anyone can run; level 2 is the usual bar for cheats and admin commands. Command blocks (given with /give @s command_block) store a command and run it on a redstone pulse or a clock, which is how maps and servers automate teleports, scoreboards and events.

Frequently asked questions

How do I enable commands in Minecraft?

In singleplayer, open to LAN or create the world with "Allow Cheats" on. On a server you need to be an operator (run /op <name> from the console). Then type / in chat to start a command.

What does @e mean in Minecraft commands?

@e is a target selector meaning "all entities" (mobs, items, armor stands, players). You narrow it with filters, e.g. @e[type=cow,limit=5], so the command only affects what you want.

What is the difference between ~ and ^ in coordinates?

~ (tilde) is relative to position on the X/Y/Z axes. ^ (caret) is relative to the direction you are facing, so ^ ^ ^3 means three blocks in front of you regardless of which way you look.

What OP level do I need for cheats?

Most cheat and admin commands require permission level 2. Server owners set this with /op, or per-level in server.properties and permissions plugins like LuckPerms.