Minecraft: Pocket Edition offers a solid, mobile experience of Minecraft, and includes many features that are also found in the Desktop and Console versions of the game. One such feature is the ability to utilize commands (or “cheats”) to perform various tasks and generally alter the state of the game. If enabled, cheats can automatically be used by the player who creates the world, and they can grant other players the ability to use cheats.
How to enable cheats
Enabling cheats on a new Minecraft: Pocket Edition world is easy. When creating your Suvival world, scroll down to the “Cheats” header and move the slider to the right, which will turn the slider green. You can also enable cheats for an existing world by tapping the pencil icon to the right of your world’s name in the “Worlds” menu. It’s important to note that cheats are automatically enabled when creating a Creative world.
Enabling cheats will trigger a pop-up warning you that Xbox Live achievements will be disabled once cheats are activated. Upon doing so, cheats will be activated and Xbox Live achievements will be permanently disabled for that world, even if you toggle the slider back to off before actually creating the World. You’ll see a message at the very top of the Game Settings menu notifying you that achievements have been disabled for the world. You can also disable and re-enable cheats in an already created world within the Edit World menu, but doing so still does not re-enable the earning of Xbox Live achievements.
How to enter commands
Once you’ve enabled cheats in your world, entering the actual commands in Minecraft: Pocket Edition is easy, too! Simply tap the “Chat” button at the top of the screen, which will open the chat box and allow you to enter your commands.
It’s worth noting that, when entering a command, Minecraft: Pocket Edition ‘s chat menu will automatically suggest arguments. You can also find extensive lists of arguments on various wikis.
Many commands which require a player to be specified will also support the use of target selectors, which can be used in place of a player’s name and to specify more than one players. The following target selectors can be used in Minecraft: Pocket Edition:
Additionally, commands which involve the moving of blocks or entities will require you to specify map coordinates for any relevant destinations. Minecraft’s map uses XYZ coordinates. Here’s how to determine the coordinates to use:
You can also use the ~ character as a relative coordinate (such as ~1, being a coordinate 1 block from your location), or in place of coordinates altogether in the case that you want to run a command with your current location as the target.
How to give other players permission to run cheats
If you’re running a Multiplayer World, you will have to give each player the permission to run commands by using the /op command, which grants a player “Operator” status. You can remove a player’s Operator status with the /deop command, also detailed below.
Here’s all the cheats and console commands that can be used in Minecraft: Pocket Edition:
List of cheats and commands in Minecraft: Pocket Edition
Clear items from a player’s inventory
/clear [player: target] [itemName: Item] [data: int] [maxCount: int]
This command can be used to remove items from a player’s inventory. It’s important to remember to specify the item name when using this command, otherwise all items will be removed from the player’s inventory.
/clear MinecraftPlayer wool 6 12
This command will remove 12 Pink Wool from the MinecraftPlayer’s inventory.
Clone or move sections of the map
This command allows you to clone a specified area of a map and either move or duplicate them to another destination. For example, you could use this command to move (or duplicate) a temple or village house to a different location (specified with coordinates).
begin: x y z and end: x y z: Used to specify the coordinates of two opposing corners of the region you are cloning.
destination: x y z: Specifies the lower northwest corner of the destination area (where you will place the cloned section).
filtered (optional): Filtered copies only the blocks of matching tileName.
tileName: Block : the name of the specific block you wish to clone.
tileData: int (optional): Specify block data to use, in case of variations on the block (for example, different colored wool blocks).
/clone 100 100 100 200 200 200 900 900 900 replace normal
This command will clone the blocks found between coordinates 100, 100, 100 and 200, 200, 200 and place them at 900, 900, 900, leaving a copy of the blocks in their original destination.
Connect to a server
This command will attempt to connect the player to the specified server. The serverUri is simply the URL (or IP) of the server.
Change the map difficulty
This command changes the map’s difficulty. It’s worth noting that on Multiplayer servers, this change will last only until the server is restarted.
This command changes the map’s difficulty mode to Easy.
Grant players positive and negative status effects
This command offers the ability to inflict specific positive and negative status effects on the targeted player. For example, you can use this command to poison a player, or grant them water breathing.
/effect MinecraftPlayer poison 15
This command will inflict the Poison effect on MinecraftPlayer for 15 seconds.
Execute a command on behalf of one or more other entities
This command allows you to execute another command on behalf of another entity. This allows to you to force a command to run as though it was entered by another player, and can be used to easily run commands on multiple targets.
/execute MinecraftPlayer ~~~ summon pig
This command summons a pig at the exact location of MinecraftPlayer.
Fill all or parts of a region with a specified block
This command can be used to fill an area with blocks. You will have to specify the corner coordinates and the region within those coordinates will be considered the valid area for the command.
from: x y z and to: x y z: These are the opposing corner coordinates of the area you wish to fill. For example, if the area is a square, you could use the bottom left corner and top right corner’s coordinates.
tileName: Block: the name of the block you wish to fill the area with.
tileData: int (optional): Specify block data to use, in case of variations on the block (for example, different colored wool blocks).
outline (optional): Replaces only the blocks on the outer edge of the area specified.
hollow (optional): Replaces the outer edge with the specified blocks, and fills the inner area with air.
keep (optional): Replaces only air blocks within the fill region (so any existing blocks will not be changed).
destroy (optional): Replaces all blocks within the fill area.
/fill 15 15 15 30 30 30 sand outline
This command fills the area with the x y z corner borders of 15 15 15 and 30 30 30 with an outline of sand blocks.
Change the game mode
/gamemode [player: target]
This command can be used to change the current game mode. Available options are Survival, Creative, Adventure or Spectator. Survival mode is the default Minecraft experience, Creative is a sandbox mode granting access to infinite blocks and removing gameplay aspects such as health and hunger, Adventure mode removes the ability to destroy blocks (intended for use in custom maps, primarily), and Spectator mode turns the player invisible and allows them to fly around the world and clip through objects and players.
mode: The desired game mode (see above), including Survival, Creative, Adventure or Spectator.
player: target: If specified, affects only that player. If unspecified, affects the player using the command.
This command switches the gamemode of the world to Creative mode.
Set or query a game rule value
These commands alter specific game mechanics, including toggling fire damage, allowing players to keep inventory on death, toggling monster drops on and off, etc. You can view an in-game list of all valid gamerules by running the /gamerule command or at the official Minecraft wiki.
/gamerule tntexplodes false
This command makes it impossible to explode TNT in the world.
Give an item to a player
/give [amount: int] [data: int] [components: json]
This command lets you give another player (or yourself) 64 of an item. You can run this command multiple times to obtain more items. It’s worth noting that items that would not normally stack still won’t stack, so don’t go giving yourself more of an item than you can physically carry (like weapons, which don’t stack).
player: target: the target which will receive the item
itemName: Item: the name of the item which they will receive
amount: int: the amount of the item which they will receive
data: int (optional): the item data of a specific item, if necessary.
components: json (optional): I have no idea what this means PLEASE CHANGE THIS
/give MinecraftPlayer diamond_pickaxe 1
This command gives MinecraftPlayer a Diamond Pickaxe.
List of all commands or get help with a specific command
/help [command: CommandName]
This command lists all available commands in the game. Since the list will be limited by the available resolution on your display, you can use the page:int command to skip to specific pages of the command list. You can also use the commandName argument to get help with a specific command, which will list the description of the command as well as its syntax.
This command will display the third page of the command list.
This command will display help specific to the /summon command.
Kill players and other entities in the world
/kill [target: target]
This command kills entities, which can include players, mobs or even non-living entities such as items. If a target is not specified, it will kill the player issuing the command.
target: target: The target to be killed.
This command kills the player MinecraftPlayer.
List all players on the server
This command shows a list of all players currently connected to the server.
Locate and display coordinates of the closest structure of a specified type
This command can be used to locate the nearest structure of a given type, specified using the arguments listed below. Running this command will output the coordinates of the nearest matching structure into the chat, which will be visible only to the player who ran the command.
Endcity – Locates the nearest End city
Fortress – Locates the nearest Nether fortress
Mansion – Locates the nearest woodland mansion
Mineshaft – Locates the nearest abandoned mineshaft
Monument – Locates the nearest monuments
Stronghold – Locates the nearest stronghold
Temple – Locates the nearest temple
Village – Locates the nearest village
This command locates the nearest village and outputs the coordinates in the chat of the player who ran the command.
Display a message about yourself
This command can be used to display a message about yourself, like a text-based emote, which will be displayed in the chat.
/me can’t stop dancing.
This command will output “MinecraftPlayer can’t stop dancing.” It will not actually make you dance, but it will certainly let everyone know that you love to boogie.
Send a private message to another player
This command is used to send chat messages to the targeted player. The commands /tell and /w will function in the same way, offering players their choice of familiar commands to private message players.
/tell OtherMinecraftPlayer what’s up
This command will private message the player OtherMinecraftPlayer with the message, “what’s up.”
Grant a player operator status (or remove their operator status)
/op (and /deop)
This command grants operator status to the targeted player. In Multiplayer, a player must have Operator status in order to run commands.
This command grants Operator status to OtherMinecraftPlayer, who is now free to run commands.
Play a specified sound
/playsound [player: target] [position: x y z] [volume: float] [pitch: float] [minimumVolume: float] (and /stopsound)
This command plays the specified sound. If there are multiple versions of a specific sound event (for example, noises made by an animal), it will play one at random. You can find a list of all of the sounds in Minecraft: Pocket Edition here.
sound: string: the sound to be played
player: target: the target (origin) to play the sound
position: x y z: specify a specific location from which to play the sound
volume: float: specify the distance that the sound can be heard.
pitch: float: specify the pitch of the sound being played.
minimumVolume: specify the volume for all targets
This command will play a cow sound, audible to the person issuing the command and any close nearby players.
Replace items in the inventory of blocks or entities with other items
/replaceitem block slot.container [amount: int] [data: int] [components: json]
/replaceitem entity [amount: int] [data: int] [components: json]
This command can be used to replace one type of item with another type of item. You can find a full list of slotTypes and slotId definitions here. So, for example, you could replace an item in a specific chest slot with a completely different item.
position: x y z (block only): Specifies the coordinates of the block to modify.
target: target (entity only): Specifies the entity (or entities) to modify. Can be players.
slotType: EntityEquipmentSlot: Specifies the inventory slot to modify.
slotID int: Used when modifying EntityEquipmentSlot, specifies the slot to be modified (such as a specific slot in a chest, or a specific armor slot).
itemName: Item: Specifies the new item with which to replace the specified item.
amount: int (optional): Specifies the number of items to be placed in the slot.
data: int (optional): Specify block data to use, in case of variations on the block (for example, different colored wool blocks).
Send a message in chat to other players
This command allows the player to make a publicly visible statement in the chat. Players should use the /msg command for private conversation.
/say I love dancing!
This command will display in the chat: “MinecraftPlayer: I love dancing!”
Change a block to another block
This command allows you to replace a block with a different block. The block being changed can either be replaced or destroyed. If there is no block in the location, you can use the keep command to change only air blocks.
/setblock 10 10 10 stone
This command will change the block located at coordinates 10, 10, 10 to a Stone block.
Set the max number of players allowed to join a multiplayer world
This command allows you to specify a maximum number of players that can join a multiplayer world. Minecraft: Pocket Edition defaults to a maximum of 8 simultaneous players per world (or 11 if playing in a Realm). You can change the maximum number of players to anything between one and 30.
This command will allow only 3 players to play in a multiplayer world at the same time.
Set the world spawn point for all players
/setworldspawn [spawnPoint: x y z]
This command sets the world spawn point for all players, which is where they will spawn upon joining the world as well as where they will respawn on death unless a different spawn point is specified using the /spawnpoint command.
/setworldspawn 255 255 255
This command sets the world’s spawn point for all players to the location at coordinates 255, 255, 255.
Set the spawn point for an individual player
/spawnpoint [player: target] [spawnPos: x y z]
This command allows you to specify a set spawnpoint for an individual player. If coordinates are not specified, the spawn point will be the current location of the player. Because of this, it’s easiest just to get the player to stand where they actually want their spawn point to be rather than to bother with coordinates.
player: target: The player whose spawn point should be set.
spawnPos: The coordinates of the player’s new spawn point.
/spawnpoint OtherMinecraftPlayer 255 255 255
This command will set player OtherMinecraftPlayer’s spawn point to the location at cpordinates 255, 255, 255.
Teleport entities to random locations within an area
This command is stupid af.
Summon an entity
/summon [spawnPos: x y z]
This command can be used to summon pretty much any entity in Minecraft: Pocket Edition, including mobs, items, vehicles, etc. You can find a list of valid entityTypes here.
entityType: EntityType: Specifies the entity to be summoned.
spawnPos: x y z: Specifies the position in which to spawn the entity. If unspecified, it will spawn the entity at the position of the player issuing the command.
This command will summon a pig where you are standing.
Change or query the time in the world
There are multiple /time commands, each with a different function. /time add can be used to add a value to the world’s game time, /time set can be used to set the world to a specific time (either defined numerically or by using day, night, noon, or midnight), and /time query can be used to return different stats on the progression of time in the world. Time is measured in game ticks, and each set of 20 game ticks is equivalent to 1 seconds in real life time. A full day in Minecraft is 24000 game ticks, which is equivalent to 20 minutes real life time.
/time set day
This command will set the time in the world to day (or 1,000, If using game tick values).
Set and control screen titles
This command can be used to display a title to players in your world in large text at the center of the screen. You can also set a subtitle to display, as well as control fade-in and fade-out. This is a neat little command for storytelling purposes. This command supports JSON syntax for additional formatting, which you can learn more about here.
player: target: Specifies the player to which to display the title.
titleText: message: Specifies the message you are sending. There are three different modes for this, title, subtitle and actionbar, each determining where the message will display.
fadeIn: int, stay: int, fadeOut: int: These arguments can be used with the /title times command to determine how many in-game ticks the message should display. If you do not specify any times with this command, default times will automatically be used.
/title @s title Welcome to Minecraft!
This command will display the message, “Welcome to Minecraft!” in the center of all player’s screens.
This command lets you teleport entities (including yourself, online players, mobs, etc.) to specified locations. If the destination is another entity (in the case of destination: target), you can use this command to teleport yourself to them. If the specified location has not yet been generated, it will still work and will simply generate the chunks around the entity once it has been teleported.
/teleport OtherMinecraftPlayer MinecraftPlayer
This command will teleport OtherMinecraftPlayer to MinecraftPlayer’s exact location.
Turn rain on and off
This command simply toggles rain. Running the command again will turn the rain off. You can achieve the same effect by using the /weather effect.
This command makes it rain. Use it again, and it makes it stop raining.
Set the weather for the world
/weather [duration: int]
This command allows you to change the weather of a world and specify a duration for the weather to last. There are three different types of weather, and the duration can be set to anything between 1 and 1,000,000 seconds.
/set weather rain 180
This command will make it rain for three minutes.
Add experience to a player (or self)
/xp [player: target]
This command allows you to add experience to a specified player. Experience added can be any amount between 0 and 2147483647. You can also add an L to the end of the amount to instead add full levels. Leave out the player target’s name and you will grant experience to yourself.
/xp 1000 OtherMinecraftPlayer
This command will grant OtherMinecraftPlayer 1000 experience points.
Clear Items From Inventory
/clear [player] [itemname]
If you wish to clear all items from your own inventory just you /clear. If you wish to use all items from another players inventory just use /clear [playername].
Give A Player A Barrier
/give [player] barrier [amount]
Barriers will appear in the player’s inventory and can be placed anywhere in the game to create an invisible barrier that cannot be cross by players or mobs.
Explore the Next-Gen Consoles, Hot New Games, Featured Gaming Deals, Lightning Gaming Deals, and Much More.