Minecraft MCPE Commands
If you want to give someone levels and not just XP
/xp @p 10L #Give 10 levels
/xp @p -10L #Take 10 levels
If you don't want PVP fights
/gamerule pvp false #Turn off PVP
Play a sound
/playsound mob.zombie.say @p #Closest player will hear a zombie
/playsound mob.ghast.scream @p ~ ~ ~ 100 #Closest player will hear a ghast scream from the direction of the command block at volume 100
Change game mode
/gamemode @p c #Set closest player to creative
/gamemode @p s #Set closest player to survival
/gamemode @p c #Set closest player to creative
Set Difficulty
/difficulty e #Set game difficulty to easy
/difficulty h #Set game difficulty to hard
/difficulty n #Set game difficulty to normal
/difficulty p #Set game difficulty to peaceful
Setting Spawn
/spawnpoint @p #Set closest player's spawnpoint
/setworldspawn ~ ~ ~ #Set the world spawnpoint where you're standing
Give and take away an item
/give @p wooden_shovel #Give closest player a wooden shovel
/clear @p wooden_shovel #Take away all woden shovels from closest player
/replaceitem entity @p slot.hotbar 0 diamond_sword #Put a diamond sword in the first hotbar box
/replaceitem block ~ ~-1 ~ slot.container 0 diamond_sword #Put a diamond sword in the first slot of a chest you're standing on
/clear @p #Take away all inventory from closest player
Pumpkin Head
/replaceitem entity @p slot.armor.head 1 pumpkin #Put a pumpkin on the closest player's head
Summon skeleton
/summon skeleton ~ ~ ~ #Create skeleton where you're standing or calling command block is
Summon primed TNT
/summon tnt ~ ~ ~ #Create primed TNT where you're standing
Kill a specific type of entity
/kill @e[type=zombie] #Kill all zombies
/kill @e[type=cow] #Kill all cows
/kill @e[type=cow,r=15] #Kill all cows in a 15 block radius
Locate
/locate endcity #Find X & Z coordinates of endcity
/locate fortress #Find X & Z coordinates of fortress
/locate mansion #Find X & Z coordinates of mansion
/locate mineshaft #Find X & Z coordinates of mineshaft
/locate monument #Find X & Z coordinates of monument
/locate stronghold #Find X & Z coordinates of stronghold
/locate temple #Find X & Z coordinates of temple
/locate village #Find X & Z coordinates of village
Recharge health
/effect @p instant_health 1 #Give closest player full health
Recharge hunger
/effect @p saturation 1 #Give closest player full hunger bar
Levitation - Cheap elevator
/effect @p levitation 2 10 #Closest player levitates for 2 seconds at speed 10
Other Effects
/effect @p resistance 255 255 #Closest player becomes invincible
/effect @p blindness 5 #Closest player becomes blind for 5 seconds
/effect @p slowness 5 2 #Closest player becomes slow * 2 for 5 seconds
/effect @p clear #Clear all effects from closest player
Set Block
/setblock ~2 ~ ~ lit_pumpkin #Place a lit pumpkin two blocks away from you
Display Title
/title @p title Welcome #Display title to closest player
Display Subtitle
/title @p subtitle Don't Die #Display subtitle to closest player
Water Cube
/fill ~ ~ ~ ~10 ~10 ~10 water 0 replace air #In a 10x10x10 from where you're standing, replace all air with water
Create a door
/setblock ~5 ~ ~ iron_door 0 #Create the bottom of iron door five blocks from you
/setblock ~5 ~1 ~ iron_door 9 #Create the top of iron door five blocks from you. Replace the 9 with an 8 if you want the hinges on the left side.