Ready to get under the hood and start tinkering in Minecraft? The command line will let you change game settings, skip long walks, and spawn a variety of interesting and dangerous entities. Inputting these commands is simple. When playing Minecraft, simply bring up the chat window and add your command after the slash. Here are the best Minecraft console commands and cheats.
related: How to Build a Simple Water Elevator in Minecraft
Best Minecraft Console Commands and Cheats
For some of the commands listed below, you may also need a list of ID codes for the various blocks and position effects. You can find a full list of those codes on the Minecraft Wiki, which will vary depending on your version of the game. You can use /help to show available commands for your platform, and /help after a command to get more information about that command.
It is far from a comprehensive list of commands, but provides a selection of useful and common commands that are available on a wide variety of platforms, with some basic uses for each.
- /clone – The clone command takes a snapshot of a specified area, and copies it to another set of coordinates. This requires at least three sets of X, Y, Z coordinates. The first two sets define opposite corners of the area from which you are copying. The third set of numbers indicates the location where the structure will be copied.
- /fill – If you only want to create a denser area with a specific block, the fill tool makes this simple. Following the command, fill in the X, Y, and Z coordinates, followed by the ID code for the block you want to use.
- /me – The me command, followed by a third-person statement, will simply share what you “did” in chat.
- /say – The say command broadcasts a message in chat to all the people currently running on the server.
- /tell – whispering secrets? Follow the tail command with a player’s name, then message, to send the message directly to them and no one else.
- /clear – If you need a way to clear your or another player’s list, the /clear command will do so in short order. You can simply type / clear for yourself, or add a space, then a player’s name, to erase their inventory.
- /give – Quickly add an item to any player’s list, including yours, using the give command. Enter the player’s name first, the item ID number, and finally the amount you’d like to pay.
- /effect – The effect command has many uses, but the two most common are to apply or remove position effects on players. To apply an effect, simply add a player name and ID code for any effect. To clear them, add the word “clear” after the player’s name, which is where the position ID will go.
- /Enchant – Works just like the Enchant command effect, except that it applies an enchantment to the item the target player is currently holding, not the person himself.
- /kill – It does exactly as it is called. You can use a player’s name or target a specific mob or NPC. If you don’t provide any parameters, the kill command will kill you instead.
- /teleport or /tp – these commands have some minor differences in parameter usage, but they both have the same basic functionality; Move players around. The most common uses are to teleport yourself to another player or have another player teleport to you. Either way, the first name after the command should be the player you’re trying to move, and the second name should be the player at the destination.
- /op and /deop (Java only) – Use the /op command to promote them to an operator, followed by a player’s name. This will allow them greater access to server commands and settings. If they start abusing their power, the /deop command will take away their titles and make them a regular player again.
- Keep Inventory When You Die (Java Only) – Use “/gamerule keepinventorytrue” to change the rules of the game so you can keep your inventory on your person when you die. To return it, change “true” to “false”.
- The /list – list command displays a quick description of all players currently connected to the server.
- /setmaxplayers (cornerstone only) – Need to let more people play? Or maybe things are a little too crowded? This command will change the total number of players that can connect to you or your server.
If you don’t feel like typing out the entire player’s name, you can use the following shortcuts to impress them faster or add a little RNG madness to your world.
- @p – nearest player
- @r – random player
- @a – all players
- @e – all entities
- /Atlantis – Are things a little too dry in your world? Use this command to raise the water level so that only the tallest mountains in your server will be above the water.
- / Difficulty – Monsters giving you trouble? The Difficulty command lets you quickly change the world’s difficulty settings. The peaceful setting prevents any hostile mobs from moving, while bumping the difficulty to easy, medium, or hard will do more damage to the mob, and make the rules for eating and survival more difficult. Minecraft has a Hardcore Mode, where dying resets the world, but it’s not available as an option here, you have to select it when creating the map.
- /gamemode – While changing the difficulty will make your Minecraft world more or less unforgiving, the gamemode command lets you swap between survival, creative, adventure, or spectator modes. It’s great for editing your adventures, then testing them out, or switching to creative when you just need a few extra blocks.
- /locate – Leaving the locate command in the chat will give you the location of the nearest structure. If you’re trying to quickly locate a village, mine shaft or citadel, it will tell you where to find it.
- /locate biome (Java only) – Using this will point you to the nearest biome.
- /mobevent – Starts or ends a specified mob event (like a pillar raid).
- /setworldspawn – Punch this command into the chat where you are standing to set a new spawn point for your world. Alternatively, you can add coordinates at the end to specify the remote point. If you use the /spawnpoint command instead, you can set the player’s individual spawn point.
- Stop Time (Java only) – If you get tired of constantly setting the time to your desired setting, use “/gamerule doDaylightCycle false” to stop the time in its tracks. Replace “False” with “True” to reactivate the timing cycle.
- /summon – Use this command to summon any mob, or a variety of non-block objects, in the world around you. You will need to use the Entity ID found on this Gamepedia page in order to actually spawn in the correct mob or item.
- /time – In lieu of the in-game clock, you can use the time command to set the current game time, or find out what time it is now. One of the most common uses is to skip to nighttime in creative mode, which you can do by entering time set 0, which will quickly turn the clock to dawn.
- /weather – too rainy for your taste? Weather Command can change the weather around you by following commands with Clear, Rain or Thunder. You can leave it blank to set it and let the weather change naturally or add a few seconds for the rain.