| This is a Guide.|
This article has been assembled by one or more members of the community as a helpful resource, instructing players on some aspect of Minecraft. If desired, you may
Commands are advanced functions activated by typing certain parts of text.
When a Player creates a new world, they will have the option of having "cheats" on or off. If a player chooses off, they will be unable to use cheats in that world unless the world is opened to LAN with cheats enabled. Some commands have no restrictions.
Starting in 1.13, all commands are more case sensitive. This means a player must type the command in all lowercase letters, if at all possible. For instance: this is no longer accepted:
Commands can also be used with Command Blocks.
List of commands
|If one sees...||Then...|
|plain text||Enter this exactly as shown|
|<angle brackets>||This is a required argument.|
|[square brackets]||This is an optional argument.|
|x|y||Pick one of the options shown. Available options are separated by vertical bars.|
|ellipsis (...)||The argument may consist of multiple words separated by spaces|
|Command||Syntax (Usage)||Action||Operator Only?||Success conditions|
| || ||Shows the syntax of a specific command||No||If <command> parameter is entered in.|
| || ||Shows a player's username then <text> (i.e. /me ran outputs *Player ran)||No/Yes (Depends on the server)||If <text> parameter is entered in|
| || ||Tells a private message to <player>||No||If <player> and <message> parameters are entered and <player> must be online|
(Older than snapshot 1.12 called 17w13a)
| ||Gives an achievement or +1 value to a statistic to [player]. If an achievement is given, all of its prerequisites will be given as well.||Yes||If no player is specified, defaults to the command's executor. Must be specified if in a command block. <stat_name> must be a valid Statistic or achievement name.|
||Gives or takes an advancement from a player, or tests whether a player has an advancement||Yes||If no player is specified, defaults to the command's executor. Must be specified if in a command block. The advancement must be valid.|
| || ||Clears <player> from [Item ID] if [DV] and [DataTag] match the one in the inventory. If [item ID] is not specified, it completely erases a player's inventory||Yes|| All tags, dv, stack count, and item id must match.|
<player> must be online.
| || ||Copies the area within the first two set of coordinates and pastes it at the third.||Yes||Maximum cube volume is 32,768 blocks (2^15)(8 chunks). The "copy" and "paste" locations cannot overlap.|
| || ||Starts profiling a debug session or stops one.||Yes|
| || ||Sets the server's default gamemode for when players join for the first time.||Yes||Gamemode must be specified.|
If getting data of block entity:
If getting data of mobile entity (mob):
|Allows the player to view, modify or delete NBT data||Yes|
| || ||Changes the difficulty of the server.||Yes||Difficulty must be specified.|
| || ||Gives <player> <effect ID> [amplifier] for [Time] seconds.||Yes|| <player> must be online|
<Effect ID> must be a valid ID.
| || ||Enchants the item in the <player>s hand with <enchantment_name>.||Yes||<player> must be online. <ID> must be an applicable enchantment name (e.g. sharpness on a sword, but not on a bow). If [Enchantment level] is specified, it cannot go over the maximum level for the enchant. Fails if the enchantment is already on the item.|
| || ||Executes <command> at the location of <player or entity>, relative to <z> <y> <z>.||Yes||If a player is specified, he/she must be online.|
| || ||Fills the between the 2 coordinates with <block Name>. If replace is used for oldBlockHandling, the next parameter tells what block <block Name> should be replaced.||Yes|| Maximum cube volume is 32,768 blocks (2^15)(8 chunks).|
Block name must be a valid name.
| || ||Changes [player]'s gamemode to <survival - creative - adventure - spectator>||Yes||Game mode must be specified. If a player is unspecified, defaults to the command's executor. Must be specified if in a command block.|
| || ||Sets a gamerule to be true or false. If value is not specified, the gamerule's value is returned. If the gamerule does not exist, creates a new gamerule that does not impact gameplay except via commands. See below for existing gamerules .||Yes||<Gamerule> must exist if the value is not specified.|
| || || Gives ||Yes|| All |
| || ||Deals 3.4*10^38 (2^128) void damage to <player>.||Yes||<player> must be online, if specified. If no player is specified, defaults to the command's executor. Must be specified if in a command block.|
|Enters the coordinates of the closest <structure> in the chat||Yes||Valid structures are: EndCity, Fortress, Mansion, Mineshaft, Monument, Stronghold, Desert Temple, Igloo, Jungle Temple, Swamp Hut, Ocean Ruin, Shipwreck, Buried Treasure, Village, and Pillager Outpost (upcoming 1.14)|
| || ||Displays the particle <name> at <x> <y> <z>, viewable only by [player] (if specified) [count] times at the specified <speed> and <dx> <dy> <dz>.||Yes|| If a player is specified, he/she must be online.|
Particle name must be valid.
| || ||Plays <sound> to <player>.||Yes|| <player> must be online.|
<player> must be able to here the sound from the coordinates (if specified).
| || ||Opens the world to LAN.||Yes|
| || Unlocks or locks the recipe <name> for [player] (only has an effect if the gamerule ||Yes||If no player is specified, defaults to the command's executor. Must be specified if in a command block.|
| || ||Reloads all functions, loot tables, etc.||Yes||Always works|
| || ||Broadcasts <message>. Appears as "[<player>] <message>"||Yes|
| || ||Changes scoreboard settings/options with the used parameters. See Scoreboard||Yes|
| || ||Tells the world seed.||Yes||As of 1.13, you can click on the seed ID to copy the seed to clipboard.|
| || ||Sets <block name> at the coordinates listed.||Yes||The block name must be a valid Block name.|
| || ||Sets the server spawnpoint to [x] [y] [z]. If no coordinates are specified, it will be at the executor's position.||Yes||Range is -30000000 to 30000000 for x and z, and 0 to 255 for y.|
| || ||Sets <player>'s spawnpoint at [x] [y] [z]. If no coordinates are specified, it will be at the executor's position.||Yes||Range is -30000000 to 30000000 for x and z, and 0 to 255 for y.|
|/spreadplayers||/spreadplayers <x> <z> [spreadDistance] [maxRange] [respectTeams] <playernames>||Spreads players out with a distance of [spreadDistance] between them within a radius of [maxRange].||Yes|
|/summon|| ||Spawns a <Savegame ID> at [x] [y] [z]. If [dataTag] is specified, the data will go into the mob. Certain mobs cannot be spawned.||Yes||<Savegame ID> must be an actual entity, and the coordinates must be between -30000000 and 30000000 for the x and z, and at least 0 for the y. If the coordinates are unspecified the entity, it is summoned at the executor's location.|
|/tellraw||/tellraw <player> <raw json message>||Sends a message to a player. When combined with /trigger, allows for non-ops to successfully click text.||Yes|| <player> must be online.|
<raw json message> must be correctly coded in JSON.
|/testfor||/testfor <player> <raw json coordinates>||tests for a player at specific coordinates||yes||<player> must be at exact coordinates|
|/time|| || Sets the time to <value> or adds <value> ticks to the current time
Sets time to <day - noon - night - midnight>
Adds t (ticks), d (days), s (seconds) [1.14 Upcoming]
|/tp||/tp <player> <player2> OR /tp <player> [<x> <y> <z>] [<rx> <ry>]||Teleports <player> to <player2> or <x> <y> <z>||Yes||<player> and <player2> must be online. <x> <y> <z> parameters must be in the range of -3000000 and 3000000.|
|/trigger||/trigger <objective> <add|set> <value>||Adds or sets <value> to the <objective> for a player. It proves useful in tellraw texts as it is non-op friendly.||Partial (see scoreboard)|
|/weather||/weather < clear|rain|thunder> [Time (seconds)]||Changes the weather to < clear - rain - thunder> for [Time] seconds.||Yes||[Time] must be 1000000 or lower, and the weather type has to be specified. If the time is unspecified, it will end at a natural pace.|
|/worldborder||/worldborder set <size> [delay] -OR- /worldborder center <x> <z>||Sets an impassible border that is <size> blocks as its area, and is centered on a location when "/worldborder center" is used. Any mobs outside of the box will gradually take damage.||Yes|
|/xp||/xp <player> <amount> OR /xp <player> <amount>L||Gives <amount> experience to <player>, or <amount>L levels to <player>.||Yes|| <player> must be online.|
For individual experience, must be between 0 and 2,147,483,647 (2^31); for levels, must be between -2,147,483,648 and 2,147,483,647.
|Command||Syntax (Usage)||Action||Operator Only?||Success conditions||/ban||/ban <player> [reason]||Bans a player.||Yes|
|/ban-ip||/ban-ip <<address> - <player>>||Stops a player's IP from coming on.||Yes|
|/banlist||/banlist [ips]||Lets a player see the banned players. "IPS" makes players see banned ips.||Yes|
|/deop||/deop <player>||Takes away operator powers from a player.||Yes|
|/kick||/kick <player> [reason]||Disconnects a player from the server.||Yes||<player> must be online.|
|/list||/list||Lets players see all online players.||No|
|/op||/op <player>||Gives a player operator powers.||Yes|
|/pardon||/pardon <player>||Pardons, or unbans, a player.||Yes|
|/pardon-ip||/pardon-ip <ip address>||Pardons, or unbans, an IP address.||Yes|
|/save-all||/save-all||Forces the server to save changes to the world save.||Yes|
|/save-off||/save-off||Stops the server from making changes to the save.||Yes|
|/save-on||/save-on||Makes the server make changes to the save.||Yes|
|/setidletimeout||/setidletimeout <minutes>||Automatically kicks players after idling (doing nothing) for <minutes> minutes.||Yes|
|/stop||/stop||Saves all changes to the save, then shuts down the server.||Yes|
|/whitelist||/whitelist <add - remove> <player> OR /whitelist list OR /whitelist <on - off> OR /whitelist reload||Whitelist options.||Yes|
Here are the list of game rules, which specifies what should be allowed, and what should not be allowed.
Syntax and Usage
- Java Edition
gamerule <rule name> [value]
Arguments in Java Edition are case sensitive, as of 1.13.
<code>gamerule <rule: BoolGameRule> [true|false]
gamerule maxcommandchainlength [value: int]
|Gamerule||What it does|
|commandBlockOutput||Enables/disables text output of command block commands to console. Defaults to true.|
|disableRaids||Disables illager raids (upcoming in JE 1.14.3). Defaults to false|
|doFireTick||Enables/disables fire spread. Defaults to true.|
|doMobLoot||Enables/disables mob drops. Defaults to true.|
|doMobSpawning||Enables/disables the spawning of mobs unless one wants them to ex: eggs and mob spawners will still spawn mobs. Defaults to true.|
|doTileDrops||Enables/disables blocks dropping items when broken (includes TNT destroying blocks).|
|keepInventory||Enables/disables keeping inventory on death. Defaults to false|
|mobGriefing||Enables/disables creepers, ghasts, and Wither blowing up blocks, endermen picking up blocks and zombies breaking doors. Defaluts to true|
|naturalRegeneration||Enables/disables regenerating health when hunger is full or close to full. Defaults to true.|
|spectatorsGenerateChunks||Whether players in Spectator Mode can generate chunks.|
|showDeathMessages||Whether a message appears in the chat when a player dies|
|logAdminCommands||Whether to log admin commands to server logs|
|spawnRadius||The possible number of blocks outward from the world spawn coordinates that a player will spawn in when first joining a server or when dying without a spawnpoint|
|doDaylightCycle||Whether the day-night cycle and moon phases should progress|
|doWeatherCycle||Whether the weather should cycle or not. Defaults to true.|
|sendCommandFeedback||Whether the feedback from commands executed by a player should show up in chat. Defaults to true|
|reducedDebugInfo||Whether the Debug Screen shows all or reduced information Defaults to false|
How often a random block tick occurs (e.g. plant growth, leaf decay, etc.) per chunk section per game tick. Defaults to 3 (Java Edition) or 1 (Bedrock Edition)
|maxEntityCramming||Maximum number of mobs accepted within a 1:1 space before suffocating.|
|announceAdvancements||Controls whether advancements should be announced in chat.|
|Bedrock Edition Only|
|commandBlocksEnabled||Controls whether Command Blocks are enabled|
|doInsomia||Controls whether phantoms spawn at night or not|
|drowningdamage||Controls whether the player takes damage when drowning|
|falldamage||Controls whether the player takes fall damage|
|fire damage||Controls whether the player takes fire damage|
|pvp||Controls whether players should fight other players|
|showcoordinates||Whether the coordinates should be displayed. Always shown on left side of screen|
|tntexplodes||Controls whether TNT explodes|
Selectors or Target Selectors are letters followed by an at sign (@) that can be used to apply the command to a player or entity without having to actually specify a player.
@p: Nearest player, or yourself if in singleplayer
@a: All players
@r: Random player
@e: All entities
@s: Command's executor or current entity (1.12), does not work with command blocks.
Brackets can be placed after a selector to specify conditions. If it is for any command that allows the use of selectors, these are called arguments.
The layout for this is: <selector>[<argument=<value>,<argument>=<value>, ...]
|Argument||Function / Action|
|x||The X coordinate for the searched area. Also is one corner for cubic selection if dx is used.|
|y||The Y coordinate for the searched area. Also is one corner for cubic selection if dy is used.|
|z||The Z coordinate for the searched area. Also is one corner for cubic selection if dz is used.|
The x distance away from the command block.
(range goes to y and z)
The y distance above from the command block.
(range goes to x and z)
The z distance away from the command block.
(range goes to x and y)
|distance||Distance from player. Use [distance=..5] for entities within 5 blocks. Use [distance=5..] for entities further than five blocks|
|NBT||Named Binary Tag of the entity|
|gamemode||The gamemode of a player. This is an argument that can have an ! in front of the value, meaning "not".|
|level||The maximum experience level amount.|
|limit||The minimum experience level amount.|
|team||The team this player is on. This is an argument that can have an ! in front of the value, meaning "not".|
|score||The score for an objective|
|type||The SaveGame ID for an entity. This is an argument that can have an ! in front of the value, meaning "not".|
|name||The name of the entity. This is an argument that can have an ! in front of the value, meaning "not".|