Welcome to our roundup of Minecraft commands. Whether it’s to copy an existing build, change the gamemode, or flat out cheat your way to glory, Minecraft console commands are an important part of playing the game day-to-day. While there are a lot of different commands out there, all varying in complexity, we’ve got a run down of the ones you need to know, and, of course, the ones you can use to troll your friends. Because what’s Minecraft without a bit of friendly griefing?
If you’re wondering how to enter the Minecraft console commands listed below, all you need to do is hit the forward-slash key (/) and that’ll bring up a small window. Input the code and hit enter and your command will activate.
If you need more Minecraft advice from us, check out our best Minecraft seeds and best Minecraft mods.
Shorthand Codes
Below are the shorthand codes to save you from typing in different player names. These are worth memorising so you don’t have to type in names like “Sniper_Kitty_Bruv_91” every time some jobber joins your game.
@p – the player nearest to you
@r – a random player
@a – all players
@e – all entities in the world.
@s – yourself
The clone command
/clone
Clones a selection of blocks to another location. Very helpful if you’re building a city space and want to duplicate multiple buildings to different areas. “
Example: /clone 100 234 -10 200 100 0 300 200 100
How to change the difficulty
/difficulty
Changes the in-game difficulty. Replace the latter section of the code with one of the following:
peaceful
easy
normal
hard
Example: /difficulty peaceful
Add an effect to yourself or someone else
/effect
Adds a status effect to the targeted player. “[seconds]”, “[amplifier]”, and “[hideParticles]” are all optional conditions, so feel free to ignore them unless you want to change the length, how strong the effect is, or whether the effect shows as particles or not. If you want to remove an effect from a player, type “/effect
Example: /effect PCGamer water_breathing 30
Enchant an item
/enchant
Adds an enchantment to the item the player is holding. So that’s smite, bane of the arthropods, sharpness—any enchantment you’d pull from a book or enchant table. Here’s a list of Enchantment IDs.
Example: /enchant PCGamer minecraft:smite 1
Exp modifier
/xp
Gives the targeted player an amount of experience points. If you just want to add levels instead, which is easier for enchanting, try “/xp
Example: /xp 100L PCGamer
Change the gamemode
/gamemode
Changes the gamemode for everyone in the session. Add a player’s name to the end of the code to alter the mode for different players. Replace “
Survival
Creative
Adventure
Spectator
Example: /gamemode Survival
Give an item or items
/give
Drops an item into the player’s inventory. Perfect for if you want to start a run with a full set of diamond gear. Just keep in mind the amount section only works for stackable items. You can’t give yourself 100 diamond swords in one go, as cool as that’d be. For a full list of item IDs, head here.
Example: /give PCGamer diamond_sword 1
Help if a command isn’t working
/help [command name]
Offers additional information about any console command. If you’re trying a command and it isn’t working as it should, type the above command before the name of the command that isn’t working and you’ll be treated to more details about how it works.
Example: /help kill
Turn keep inventory on
/gamerule keepInventory true
Changes the game rules so should you die, you keep all the items in your inventory. Replace “true” with “false” to turn it off again.
Kill everyone or everything
/kill
Advertisement
Kills everything, including the player. But should you want to kill another player, use “/kill
The play sound command
/playsound Plays a specific sound file. Great for if you want to use a command block to play a sound when someone opens a door. Who doesn’t love a good doorbell? Take a look at all the sound file names here. Example: /playsound minecraft:entity.elder_guardian.ambient voice @a How to check the world seed /Seed Displays the seed for their current world should you wish to replay the seed again from scratch or pass it along to a mate. Set the world spawn /setworldspawn Changes the world spawn to wherever the player is standing. If you don’t want to do that, you can also set it to a predetermined location with “/setworldspawn Stop time from changing /gamerule doDaylightCycle false This completely turns the daylight cycle off so it’ll always be the current time of day. To reenable the cycle, replace “false” with “true.” Advertisement Spawn a mob /summon Summons a mob to a specific location. Remove the “[x] [y] [z]” section at the end to have the mob spawn right on top of you. Just remember if you’re spawning the Wither you’ll need to leg it as fast as possible. Example: /summon creeper Teleport /tp [target player] Teleports the targeted player to a designated location. And yes, you can indeed teleport a friend into the sky and laugh as their body flails back down to earth. Example: /tp PCGamer 100 0 10 Alter the in-game time /time set Sets the in-game time. Add one of the following numbers onto the end to change the time of day to something else: 0 – Dawn /weather Changes the in-game weather to a different type. I.e. “/weather thunder” would start a thunderstorm. This one’s a must if you’re going after charged creepers. Nobody’s got time to sit around waiting for it to thunder.
1000 – Morning
6000 – Midday
12000 – Dusk
18000 – Nightist
Change the weather to something nicer, or worse