Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Appendix A — Command Quick Reference

Java Edition (current). This is a fast lookup for every command this book actually uses, in alphabetical order. Each entry gives the Java syntax (Bedrock forms are not shown), a one-line description, and the chapter(s) where the command appears.

Notation, the same as in the in-game help and on the wiki: <required> is an argument you must supply, [optional] may be left out, a|b means “choose one of a or b”, and ... means the command continues with more arguments. A leading / is shown when you type a command straight into chat; inside a function file you write the command without the slash.

Every syntax line below matches that command’s page on the wiki (Commands/<name>).


/advancementadvancement (grant|revoke) <targets> (everything | only <advancement> [<criterion>] | from <advancement> | through <advancement> | until <advancement>) — Grants or revokes an advancement (or a single criterion) for one or more players. (Ch 9, 19, 30, 31, 32, 34, 38)

/cloneclone [from <sourceDimension>] <begin> <end> [to <targetDimension>] <destination> [strict] [replace|masked|filtered <filter>] [force|move|normal] — Copies a region of blocks from one place (or dimension) to another. (Ch 2, 40)

/damagedamage <target> <amount> [<damageType>] [at <location>] [by <entity>] [from <cause>] — Deals a set amount of damage to the target entities, using the game’s normal damage rules. (Ch 21, 23, 36)

/datadata (get|merge|modify|remove) (block <pos>|entity <target>|storage <target>) ... — Reads, merges, modifies, or removes the NBT data of a block entity, entity, or command storage. (Ch 7, 8, 9, 10, 1, 3, 4, 11, 12, 13, 20, 21, 25, 27, 28, 33, 38, 40, 43)

/datapackdatapack (enable <name> [first|last|(before|after) <existing>] | disable <name> | list [available|enabled] | create <id> <description>) — Loads, unloads, lists, or creates data packs. (Ch 9, 10, 28, 34)

/dialogdialog (show <targets> <dialog> | clear <targets>) — Shows a dialog screen (from the minecraft:dialog registry or inline SNBT) to players, or clears it. (Ch 39)

/effecteffect (give <targets> <effect> [<seconds>|infinite] [<amplifier>] [<hideParticles>] | clear [<targets>] [<effect>]) — Gives or removes status effects on players and other entities. (Ch 8, 3, 4, 13, 18, 19, 27, 31, 32, 35, 36)

/enchantenchant <targets> <enchantment> [<level>] — Adds an enchantment to the item a player or mob is holding in its main hand. (Ch 35)

/executeexecute (align|anchored|as|at|facing|in|on|positioned|rotated|store|if|unless|run ...) ... — Runs another command with a changed executor, position, rotation, dimension, condition, or stored result. (Ch 3, 4, 5, 11, 12, 13, 14, 18, 25, 26, 27, 31, 32, 33, 44, 45)

/fillfill <from> <to> <block> [outline|hollow|destroy|strict|replace [<filter>]|keep] — Fills a cuboid region with a chosen block. (Ch 2, 40, 44)

/functionfunction <name> [<arguments> | with (block <pos>|entity <source>|storage <source>) [<path>]] — Runs the commands in a function file (or every function in a function tag), optionally passing macro arguments. (Ch 8, 9, 10, 1, 2, 3, 4, 5, 11, 12, 13, 14, 16, 17, 19, 20, 21, 22, 23, 25, 26, 27, 28, 30, 31, 32, 33, 34, 36, 38, 39, 40, 42, 45)

/gamerulegamerule <rule name> [<value>] — Sets or queries the value of a game rule. (Ch 10, 2)

/givegive <targets> <item> [<count>] — Gives one or more players an item (with optional item components and count). (Ch 8, 10, 1, 2, 5, 19, 21, 22, 23, 24, 26, 28, 29, 30, 31, 32, 34, 36, 38, 39, 40, 42)

/itemitem (modify (block <pos>|entity <targets>) <slot> <modifier> | replace (block <pos>|entity <targets>) <slot> (with <item> [<count>] | from (block <pos>|entity <target>) <slot> [<modifier>])) — Modifies or copies items in the inventory slots of blocks or entities. (Ch 9, 10, 14, 15, 16, 17, 19, 20, 21, 24, 31, 34, 37, 39)

/lootloot <TARGET> <SOURCE> (TARGET = give <players> | insert <pos> | spawn <pos> | replace block|entity <pos/target> <slot> [<count>]; SOURCE = fish <table> <pos> [<tool>] | loot <table> | kill <target> | mine <pos> [<tool>]) — Generates items from a loot table and gives, inserts, spawns, or replaces them. (Ch 7, 16, 17, 19, 31, 34, 37)

/particleparticle <name> [<pos>] [<delta> <speed> <count> [force|normal] [<viewers>]] — Creates particles at a position. (Ch 2, 4, 27, 31)

/placeplace (feature <feature> [<pos>] | jigsaw <pool> <target> <max_depth> [<pos>] | structure <structure> [<pos>] | template <template> [<pos>] [<rotation>] [<mirror>] [<integrity>] [<seed>] [strict]) — Places a configured feature, structure, structure template, or jigsaw structure. (Ch 40, 41)

/placefeatureplacefeature <feature> [<pos>] — Places a single configured feature at a position if its placement requirements are met. (Ch 43)

/playsoundplaysound <sound> [<source>] [<targets>] [<pos>] [<volume>] [<pitch>] [<minVolume>] — Plays a sound event to players at a location, with optional volume and pitch. (Ch 2, 19, 30, 31, 34)

/randomrandom (value|roll) <range> [<sequence>] (also random reset (* | <sequence>) [<seed>] [<includeWorldSeed>] [<includeSequenceId>]) — Generates a random integer in a range, or manages random sequences. (Ch 3, 16, 26)

/reloadreload — Reloads the world’s data packs without leaving the world. (Ch 8, 9, 10, 1, 2, 4, 5, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 30, 31, 32, 33, 34, 35, 36, 38, 39, 41, 42, 43, 44)

/returnreturn (<value> | run <command>) — Ends a function early, setting its return value and success; can also stop a forking execute. (Ch 25)

/saysay <message> — Broadcasts a plain-text message in chat to everyone on the server. (Ch 9, 10, 1, 2, 3, 4, 11, 12, 13, 14, 18, 20, 21, 23, 25, 27, 28, 31, 34, 36, 39)

/scheduleschedule function <function> <time> [append|replace] (also schedule clear <function>) — Runs a function (or function tag) after a delay, or clears a pending schedule. (Ch 26, 33)

/scoreboardscoreboard (objectives (add <objective> <criteria> [<displayName>]|remove <objective>|list|setdisplay <slot> [<objective>]|modify ...) | players (set|add|remove <targets> <objective> <score>|get <target> <objective>|operation <targets> <obj> <op> <source> <obj>|reset <targets> [<objective>]|enable <targets> <objective>|list ...)) — Creates and manages scoreboard objectives and the scores held against them. (Ch 5, 11, 12, 13, 25, 26, 27, 33)

/setblocksetblock <pos> <block> [destroy|keep|replace|strict] — Changes the single block at a position to another block. (Ch 2, 27, 44)

/stopsoundstopsound <targets> [<source>] [<sound>] — Stops a playing sound (or all sounds) for the targeted players. (Ch 30)

/summonsummon <entity> [<pos>] [<nbt>] — Summons a new entity at a position, with optional NBT data. (Ch 1, 2, 3, 4, 25, 27, 36)

/tagtag <targets> (add <name> | remove <name> | list) — Adds, removes, or lists scoreboard tags on entities. (Ch 3, 11, 13, 14, 16, 20, 27, 32, 33, 37, 43)

/teleport (alias /tp) — teleport [<targets>] (<location> [<rotation> | facing <facingLocation> | facing entity <facingEntity> [<facingAnchor>]] | <destination>) — Teleports entities to a location or to another entity. (Ch 1, 3, 4, 25, 27, 44, 45)

/tellrawtellraw <targets> <message> — Sends a formatted text-component (raw JSON text) message to players. (Ch 1, 5, 26, 30, 33, 34, 39)

/testtest (run <tests> ... | runclosest|runthat|runthese ... | runmultiple <tests> [<amount>] | runfailed ... | create <id> [<width>] [<height> <depth>] | locate <tests> | pos [<var>] | verify <tests> | clearall [<radius>]|clearthat|clearthese | resetclosest|resetthat|resetthese | export ... | stop) — Manages and runs GameTests. (Ch 8, 10, 14, 17, 25, 37, 39, 42, 43)

/titletitle <targets> ((title|subtitle|actionbar) <title> | times <fadeIn> <stay> <fadeOut> | clear | reset) — Controls the large screen text (title, subtitle, action bar) shown to players. (Ch 1, 5, 11, 19, 26, 32, 33, 39)

/versionversion — Prints the server’s game version info to chat (game name, pack_resource and pack_data formats, etc.). (Ch 9, 46)


Notes

  • tp is the built-in alias of teleport; both run the same command. It lives under Commands/teleport (there is no separate Commands/tp page), so the syntax above is the authoritative one.
  • gamerule is used as a command (e.g. /gamerule keep_inventory true) and is also discussed where world settings come up; its syntax line traces to Commands/gamerule.
  • Long branching commands (/execute, /scoreboard, /data, /item, /loot, /test) are summarized to their top-level forms here. The full syntax trees are in the body chapters and on each command’s wiki page.
  • Every command the book uses is covered here: all 34 distinct commands (35 counting the tp alias) have a Commands/<name> page on the wiki if you want to dig deeper.