Specsight on Product Hunt We support a Polish startup Vote
Discord
Specsight on Product Hunt minecraft.pl supports a Polish startup Specsight shows what changed after every release. Please vote and comment. Vote
Complete list of commands

Minecraft commands: the complete list of every command

The full list of commands available in Minecraft Java Edition and Bedrock Edition (as of October 2026, version 26.3). Every command comes with a description, its syntax and an edition label. At the bottom of the page you'll find a list of game rules and a cheat sheet of the most used commands.

Last updated: October 28, 2026

How to use commands

You type commands in chat (the T key), starting with a slash (/). Once you type /, the game suggests the available commands (Tab in Java, automatic suggestions in Bedrock).

Requirements:

  • Singleplayer: when you create a world, turn on Allow Commands (Java) or Activate Cheats (Bedrock). In an existing world in Java 26.3 and newer: Esc, World Options, Allow Commands. You'll find the steps for older versions in our guide on how to enable cheats.
  • Multiplayer: an admin has to give you operator status (/op PlayerName from the console, or through the ops.json file).
  • Command block: in command blocks you leave out the slash. Type gamemode creative @p, not /gamemode creative @p.

Syntax conventions in this guide:

  • <parameter>: a required parameter
  • [parameter]: an optional parameter
  • a|b|c: pick one of the options

Player commands

Commands that affect the player directly: teleporting, inventory, effects and game modes.

CommandSyntaxDescription
/gamemode /gamemode <survival|creative|adventure|spectator> Changes a player's game mode.
/tp / /teleport /tp <target> <x> <y> <z> Teleports a player or mob to the given coordinates or to another player.
/give /give <player> <item> [count] Gives a player an item in the given amount.
/clear /clear [player] [item] [count] Removes items from a player's inventory. With no parameters it clears the whole inventory.
/kill /kill [target] Instantly kills the given target (a player or a mob). With no parameter it kills the player who typed the command.
/effect /effect give <target> <effect> [seconds] [amplifier] Gives a status effect (Speed, Strength, Invisibility and so on) for the given time.
/enchant /enchant <player> <enchantment> [level] Applies an enchantment to the held item.
/xp / /experience /xp add <player> <amount> [points|levels] Adds or sets experience points or levels.
/spawnpoint /spawnpoint [player] [x] [y] [z] Sets a player's respawn point to the given coordinates.
/seed /seed Shows the seed of the current world. Doesn't need cheats in singleplayer.
/spectate /spectate [target] [player] Makes a player in Spectator mode watch from the given target's perspective. Java only.
/posteffect /posteffect add|remove <players> <effect> Applies or removes a post-processing effect on a player's screen, such as blur. Java 26.3+ only.

World commands

Commands that control the world's settings: time, weather, difficulty and the world border.

CommandSyntaxDescription
/time /time set <day|noon|night|midnight|value> Sets the time of day. 0 = dawn, 6000 = noon, 13000 = night, 18000 = midnight. Since Java 26.1 it works on world clocks and also has pause, resume and rate.
/weather /weather <clear|rain|thunder> [duration] Changes the weather to clear, rain or a thunderstorm.
/difficulty /difficulty <peaceful|easy|normal|hard> Changes the world's difficulty.
/gamerule /gamerule <rule> [value] Changes world rules. In Java 1.21.11 and newer the names are written in snake_case (advance_time, keep_inventory, mob_griefing); older Java versions use camelCase (doDaylightCycle, keepInventory, mobGriefing).
/setworldspawn /setworldspawn [x] [y] [z] Sets the world's default spawn point for new players and compasses.
/worldborder /worldborder set <size> [time] Sets the world border. Size in blocks, with an optional time for shrinking or growing it.
/locate /locate structure <structure> Shows the coordinates of the nearest structure (village, fortress, stronghold and so on).
/forceload /forceload add <x1> <z1> [x2] [z2] Keeps the given chunks loaded at all times (even with no players nearby). Java only.
/fillbiome /fillbiome <from> <to> <biome> [replace <filter>] Changes the biome in a chosen area without touching the blocks. Java 1.19.3+ only.

Block and entity commands

Commands for placing blocks, summoning mobs, cloning structures and visual effects.

CommandSyntaxDescription
/setblock /setblock <x> <y> <z> <block> [mode] Places a block at the given coordinates. Modes: replace, destroy, keep.
/fill /fill <x1> <y1> <z1> <x2> <y2> <z2> <block> [mode] Fills a rectangular area with the given block. Up to 32,768 blocks at a time.
/clone /clone <x1> <y1> <z1> <x2> <y2> <z2> <dest_x> <dest_y> <dest_z> Copies a rectangular area of blocks to another location.
/summon /summon <mob_type> [x] [y] [z] [NBT] Summons a mob at the given coordinates, with optional NBT data.
/particle /particle <type> <x> <y> <z> [dx] [dy] [dz] [speed] [count] Creates particle effects at the given location.
/playsound /playsound <sound> <source> <player> [x] [y] [z] [volume] Plays a sound for the given player.
/swing /swing [targets] [mainhand|offhand] Plays the hand swing animation of a player or mob without dealing a hit. Java 26.1+ only.
/data /data get/merge/modify/remove <target> [path] Reads or changes the NBT data of entities, blocks and storage. Java only.
/item /item replace <target> <slot> with <item> [count] Puts an item in a specific slot of an entity or block. Java only.
/loot /loot <target> <source> Generates and places loot from loot tables. Java only.

Server commands

Commands for running a multiplayer server: bans, operators, the whitelist and communication.

CommandSyntaxDescription
/op /op <player> Gives a player operator status, which lets them use commands.
/deop /deop <player> Takes operator status away from a player.
/ban /ban <player> [reason] Bans a player from the server (permanently). Multiplayer only.
/ban-ip /ban-ip <IP_address> [reason] Bans an IP address from the server. Blocks every account on that IP.
/pardon /pardon <player> Unbans a player (removes them from the ban list).
/kick /kick <player> [reason] Kicks a player from the server. They can connect again.
/whitelist /whitelist add/remove/list/on/off <player> Manages the server whitelist (the list of allowed players).
/msg / /tell / /w /msg <player> <message> Sends a private message to a specific player.
/say /say <message> Sends a message to every player on the server as a server announcement.
/party /party <message> Sends a message to your party chat. Bedrock 26.50+ only.
/publish /publish [commands] [port] Opens a singleplayer world to LAN. Java only, doesn't work on a dedicated server.
/unpublish /unpublish Stops sharing the world on LAN without leaving the game. Java 26.2+ only.
/list /list Shows the list of players online on the server.
/stop /stop Shuts the server down safely (saves the world and disconnects players).
/save-all /save-all Forces the world to be saved to disk. Use it before shutting down the server.

Advanced commands

Commands for command blocks, data packs and advanced logic (for map makers and server admins).

CommandSyntaxDescription
/execute /execute as/at/in/if/unless/run ... Runs a command in a modified context (as another player, at another place, conditionally). The most powerful command in the game.
/scoreboard /scoreboard objectives/players ... Manages scoreboards. The basis of scoring systems, timers and logic in command blocks.
/tag /tag <target> add/remove/list <tag> Adds or removes tags on entities. Tags are used to select entities in /execute.
/team /team add/remove/modify/join ... Manages teams (name color, friendly fire, collision, prefix/suffix).
/function /function <namespace:path> Runs a function from a data pack (.mcfunction).
/schedule /schedule function <namespace:path> <time> Schedules a function to run after the given time. Java only.
/tellraw /tellraw <target> <JSON_text> Sends a formatted JSON message (clickable links, colors, hover text).
/title /title <target> title/subtitle/actionbar <JSON_text> Shows large text in the middle of the screen (title), smaller text below it (subtitle) or text above the hotbar (actionbar).
/bossbar /bossbar add/set/remove ... Creates and manages boss bars (shown at the top of the screen). Java only.
/trigger /trigger <objective> [add|set] [value] Lets players without cheats change a chosen scoreboard objective. Java only.
/advancement /advancement grant/revoke <player> <advancement> Grants or revokes advancements. Java only.
/recipe /recipe give/take <player> <recipe|*> Unlocks or locks crafting recipes. Java only.
/attribute /attribute <target> <attribute> get/base set/modifier add ... Reads and changes the attributes of players, mobs and armor stands (health, speed, size). Java only.
/fetchprofile /fetchprofile name|id|entity <value> Fetches a player profile with its skin by name, UUID or entity. Java 1.21.9+ only.
/ride /ride <passenger> mount/dismount <vehicle> Puts one entity on another as a rider, or makes it get off.
/damage /damage <target> <amount> [type] Deals damage to the given target. Java 1.19.4+.
/return /return <value> Returns a value from a function (for /execute store). Java 1.20.2+ only.
/compute /compute <context> integer <provider> or /compute <context> float <provider> [scale] Calculates the value of a number provider: a registered one (for example minecraft:brewing/uses_default) or one written in the command. The context is default (the position and entity running the command), block <position> or entity <target>. In float mode it multiplies the result by the scale (1.0 by default) and rounds down. A tool for data pack creators. Java 26.3+ only.

Game rules (gamerules)

Game rules are special world settings you change with the /gamerule <rule> <true|false|value> command. Here are the most important ones:

Note for Java Edition: since version 1.21.11, Java game rules have snake_case names, and some of them got completely new names: keepInventory is now keep_inventory, doDaylightCycle is advance_time and doMobSpawning is spawn_mobs. The table gives the current Java name, the old name (Java up to 1.21.10) and the Bedrock name. Names are case-sensitive in Java but not in Bedrock.

Rule (Java 1.21.11+)Old name / BedrockDefaultDescription
keep_inventory keepInventory / keepinventory false Players keep their inventory and experience after death.
advance_time doDaylightCycle / dodaylightcycle true The day and night cycle (on/off).
advance_weather doWeatherCycle / doweathercycle true The weather cycle (on/off).
mob_griefing mobGriefing / mobgriefing true Mobs can destroy and change blocks (creepers, endermen, ghasts).
spawn_mobs doMobSpawning / domobspawning true Natural mob spawning (on/off).
fire_spread_radius_around_player doFireTick / dofiretick 128 The radius in blocks around players within which fire spreads. 0 turns spreading off, -1 removes the limit. In Java it replaced doFireTick; Bedrock still uses dofiretick (true by default).
block_drops doTileDrops / dotiledrops true Broken blocks drop items.
natural_health_regeneration naturalRegeneration / naturalregeneration true Players regenerate health when their hunger bar is full. False = UHC-style play.
show_death_messages showDeathMessages / showdeathmessages true Shows player death messages in chat.
command_block_output commandBlockOutput / commandblockoutput true Command blocks show their output in chat.
pvp pvp / pvp true Players can damage each other. In Java the rule has existed since 1.21.9; before that, PvP could only be set in server.properties.
spawn_phantoms doInsomnia / doinsomnia true Phantoms appear when a player hasn't slept for 3 nights or more.
immediate_respawn doImmediateRespawn / doimmediaterespawn false Players respawn right after death (no death screen).
players_sleeping_percentage playersSleepingPercentage / playerssleepingpercentage 100 The percentage of players who have to sleep to skip the night (0-100). Java 1.17+.
random_tick_speed randomTickSpeed / randomtickspeed 3 (Bedrock: 1) The speed of random ticks, which drive things like plant growth and grass spreading.
max_command_sequence_length maxCommandChainLength / maxcommandchainlength 65536 The maximum number of commands in one chain or function. A safeguard against loops.

Java 26.3 has 59 game rules. The ones above are the most commonly used. We cover the syntax and the name differences between versions on the /gamerule command page, and the most popular rule in our keep inventory guide.

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

Selectors let you choose who a command affects without typing a player name:

  • @p: the nearest player (to where the command runs)
  • @a: every player on the server
  • @r: a random player
  • @e: all entities (players + mobs + items + arrows and so on)
  • @s: the player or entity running the command (self)

Selector arguments

Selectors take arguments in square brackets that filter the result:

  • @e[type=minecraft:creeper]: all creepers
  • @a[distance=..10]: players within 10 blocks
  • @e[type=minecraft:zombie,limit=1,sort=nearest]: the nearest zombie
  • @a[team=red]: players on the "red" team
  • @e[tag=boss]: entities with the "boss" tag
  • @a[scores={kills=10..}]: players with 10+ points on the "kills" objective
  • @a[gamemode=survival]: players in Survival mode
  • @e[nbt={OnGround:1b}]: entities standing on the ground (Java only)

Cheat sheet of the most used commands

Copy it, print it or save it for later:

Survival and convenience

  • /gamemode survival / /gamemode creative: switch your game mode
  • /time set day: make it day
  • /weather clear: clear the weather
  • /gamerule keep_inventory true: keep your inventory after death (Java up to 1.21.10: keepInventory)
  • /gamerule advance_time false: stop time (formerly doDaylightCycle)
  • /gamerule mob_griefing false: mobs don't destroy blocks (formerly mobGriefing)
  • /difficulty peaceful: no hostile mobs
  • /kill: a quick reset (kills you)

Teleporting and navigation

  • /tp @s ~ ~ ~: your current position (a quick way to check it)
  • /tp @s 0 64 0: teleport to coordinates
  • /tp @s PlayerName: teleport to another player
  • /locate structure minecraft:village_plains: find the nearest village
  • /locate structure minecraft:stronghold: find a stronghold (the End portal)
  • /locate biome minecraft:mushroom_fields: find a mushroom island

Items and effects

  • /give @s minecraft:diamond 64: 64 diamonds
  • /give @s minecraft:netherite_sword: a netherite sword
  • /effect give @s minecraft:speed 600 2: Speed III for 10 minutes
  • /effect give @s minecraft:night_vision 99999: Night Vision that lasts practically forever
  • /effect clear @s: remove all effects
  • /enchant @s minecraft:sharpness 5: Sharpness V on the held item

Server

  • /op PlayerName: give operator status
  • /deop PlayerName: take operator status away
  • /ban PlayerName reason: ban a player
  • /kick PlayerName: kick a player
  • /whitelist add PlayerName: add a player to the whitelist
  • /save-all: save the world

Frequently asked questions

How do I turn on commands in Minecraft?

When you create a new world, turn on Allow Commands (Java) or Activate Cheats (Bedrock). In an existing world in Java 26.3 and newer, press Esc, click World Options and turn on Allow Commands. In Java 26.2, World Options is in the Options menu, and in Java 26.1 and older you use Open to LAN with Allow Commands turned on: commands then work until you close the world. On a multiplayer server, an admin has to give you operator status with the /op command from the console.

How many commands are there in Minecraft?

Minecraft Java Edition 26.3 has more than 80 commands. Bedrock Edition has about 70. Some commands are shared (tp, give, gamemode, time, weather) and some are available in only one edition (for example /data, /execute in its Java form, /testfor in Bedrock). Mods and data packs can add their own commands.

What is the difference between a / command and a command in a command block?

In chat, commands start with a slash (/gamemode creative). In command blocks you leave the slash out (gamemode creative). Otherwise they work exactly the same. Command blocks can run commands automatically (repeating, conditions, delay), which you can't do from chat.

Do commands disable achievements?

In Java Edition, turning on cheats doesn't block achievements (advancements). In Bedrock Edition, turning on cheats permanently blocks achievements in that world, even if you turn cheats off again.

Can I use commands on a server without operator status?

As a rule, no. One exception is the /trigger command (Java), which an admin can make available to every player. Some server plugins (EssentialsX, LuckPerms) let admins grant access to selected commands through a permission system.

Detailed guides to individual commands: /locate, /time, /weather, /effect, /give, /summon, /fill, /teleport. You'll find ready-to-copy codes on our cheats and commands page, and the rest of the guides in the commands section.