Commands/List of Commands

Given below is a detailed list of all Commands in Minecraft Pocket Edition.

clone
Copies blocks from one place to another /clone    [maskMode] [cloneMode] [tileName] Clones blocks from the cube defined by  and   into the. The  defines how to handle destination blocks, and   defines handling of source. If mask is filtering, the   specifies the block to filter on.

Legal values for  are: Legal values for  are: See also setblock and fill commands.
 * – Only blocks matching tileName is copied.
 * – Only non-air blocks are copied.
 * – All blocks are copied as-is. This is the default.
 * – Force moving of blocks even if regions overlap.
 * – Move only non-air blocks, and replace them with air-blocks. If filtering is done, this only applies to the filtered blocks.
 * – Do not force or move blocks from source region. This is the default.

connect
Connects to a server in-game /connect 
 * Note:URi is as the code appears in the chat. It is unknown if this is a bug.

deop
Revokes operator status for one or more players /deop  See also op, for giving this status.

enchant
Enchant player(s) held item. /enchant   [level: int] /enchant   [level: int] Enchant the item the targeted player(s) are holding, with the name (or numbered) enchantment at a given level. Maximum level for a given enchantment can't be bypassed.

execute
Executes a command which can be linked to a target or a condition related to another block, as tested in the testforblock command. /execute  /execute    /execute    <detectPos: x y z> <detectBlock: string> <detectData: int> <command: string> The  in all examples can be any command (including the execute command it self), and are relative to the targeted player(s)/entities. In the latter two examples, the tilde notation is used relative to the position of the  target.

The last variant, with the  string equal to "detect", the command is only executed if the condition, as if it was given to testforblock, is matched.

fill
Fills a region with a given block /fill <from: x y z> <to: x y z> <tileName: string> [tileData:int] [oldBlockHandling] Fills the entire cube defined by  and   with the block named   (optionally specifying a   value). The  defines how to handle existing blocks in the region.

Legal values for  are: See also setblock and clone commands.
 * – Replace all blocks, drops blocks and contents as if mined with unenchanted diamond pickaxe or shovel.
 * – Replace only the blocks on the outer edge of the region. Drops all inner blocks as if they were mined, and replaced them with air blocks.
 * – Only replace the air blocks in the fill region with the specified block.
 * – Only replace the outer edge of region with specified block. Leave all inner blocks as they were.
 * – Replace all blocks, with no dropping of current blocks. This is the default.

gamemode
Changes gamemode for a player. /gamemode <gameMode: string> [player: target] /gamemode <gameMode: int> [player: target] Using 'c', 'creative', 's', 'survival', '0', '1', or '2' the gamemode for the targeted player can change.

give
Give a targeted player(s) item(s). /give <player: target> <itemName: string> [amount: int] [data: int] Adds items to the targeted player(s) inventory. Multiple items of the same type can be given by specifying an amount, and some characteristics of the item can be changed by providing the optional data argument.

help
Displays helps related to commands. /help <command: string> Lists help related to a specific command. In 0.16.0 this text is rather short (or missing). /help [page: int] Typing optionally followed by a number gives a list of commands. With a number it shows the n'th help page.

kill
Kills (or removes) a player or an entity.

/kill [target: target]

Without argument kills the Player itself. Using a players name would kill that player, and  would remove all creepers. See summon to spawn entities.

list
Lists all online players of the current game, and maximum players allowed. /list

locate
Locates the nearest selected structure. /locate <feature: string> The command only gives the coordinates of the nearest structure, the Player must teleport/travel to it themselves.

op
Gives operator status to one or several players /op <player: target> See deop, which revokes this status.

say
Says something to all players. /say <message: string> See also tell for addressing specific player(s).

setblock
Changes a single block at a given position. /setblock <position: x y z> <tileName: string> [tileData: int] [oldBlockHandling] Replaces the block according to the following values of oldBlockHandling: See also clone and fill commands.
 * – Destroys the original block as if done by The Player, before placing the new block
 * – Only replaces air blocks with the new block
 * – Replaces without regards of old block. No dropping of block or content. This is the default

setworldspawn
Sets the world spawn /setworldspawn [spawnPoint: x y z] Sets the worlds spawn point to given position. If position is not given, it defaults to the given players current position. After succesfully setting the spawn point, the Compass now points to this point.

spawnpoint
Sets spawn point for targeted player(s) /spawnpoint [player: target] [spawnPos: x y z] Sets the spawn point of a player to the given position. If neither is given it default to current player and current position. Does not affect the compass.

summon <p style="font-weight:normal;">Creates an entity at given position.

/summon <entityType: string> <spawnPos: x y z>

<p style="font-weight:normal;">Spawns the named entity at your given position. I.e. . Note that position must be specified. See kill for removing entities.

tell
Tells specific player(s) a message. /tell <recipient: target> <message: string> Only the targeted player(s) receives the message. See also say if message is for everyone.

testforblock
Tests whether a block is in a given location /testforblock <position: x y z> <tileName: string> [dataValue: int] Checks whether the given position has the given block. Reports back through texts in the chat window.

testforblocks
/testforblocks <begin: x y z> <end: x y z> <destination: x y z> [mode] The  and   arguments specifies the source regions which are matched against a equally sized region starting at. Legal values for  are: A succesful match will list number of matching blocks. The region to match might overlap, but it must not be too large.
 * – Each and every block must match to be part of the match total. This is default.
 * – Air blocks in the source region are ignored in the destination.

time
Changes or queries the world's game time. /time add <amount: int> /time query <time: string> /time set <time: string> /time set <time: int> A full day in Minecraft equals 24 000 ticks, approx 20 minutes in real time. A  starts at 1000, and   starts at 13000. When querying  refers to whole days,   refers to gameticks of current day, and   refers to total amount of gameticks since current game started.

toggledownfall
Changed whether there is downfall or not. /toggledownfall If it rains or snows, it'll stop doing so, and vice versa.

tp
Teleports an entity to a given coordinate. /tp <destination: target> /tp <destination: x y z> [y-rot: int] [x-rot: int] /tp <victim: target> <destination: target> /tp <victim: target> <destination: x y z> [y-rot: int] [x-rot: int] Teleports either The Player, or a given victim player to the specified destination. Additionally rotates the player. This command has the interesting side effect of displaying the target coordinates, so that doing a  will actually tell the current coordinates of The Player.

weather
Sets the current weather for a given duration. /weather <type: string> [duration: int] Sets the weather type to either clear, rain or thunder. Rain becomes snow in a cold biome. Duration, if not set, is random between 6000 and 13000 gameticks.

wsserver
Connects to an automation server (developer use only). /wsserver <serverUri: string> Unknown usage, reportedly used by developers only. Connects to a websocket server using an unknown protocol.

xp
Adds experience to the targeted player. /xp <amount: int> <player: target> /xp <amount: int>L <player: target> In the first variants it adds the amount of experience to the targeted player. If you append the L after the amount, it adds levels instead of only experience points.

Command arguments
Most commands accept arguments, i.e., where the first part indicates what the arguments refers to, and the second part refers to the type of argument. In the example given you identify a  by using a   type argument. The different types of arguments are described within this section.

string
Any combination of alphanumeric characters.

int
A number, which might have range assosicated with it. It might be a negative number.

x y z
A coordinate set of 's denoting a coordinate. The  value indicates distance towards the East from the origin. The  value indicates height above bedrock. The  value indicates distance towards North from the origin. Note that to use The Player's position you might use '~' or offsets based upon this. I.e. the command move The Player 5 meters/blocks to the East, keep the height, and 10 meters/blocks to the South (as it is a negative offset).

target
Instead of specifying coordinates, some commands allow specifying a target. This can relate both to players and entities. These selector arguments can be further specified using text like in which would kill all cows within a radius of 10 meters/blocks.
 * – All players
 * – All entities
 * – Nearest players
 * – Random player(s)