Image Credit: Bethesda
Forgot password
Enter the email address you used when you joined and we'll send you instructions to reset your password.
If you used Apple or Google to create your account, this process will create a password for your existing account.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Reset password instructions sent. If you have an account with us, you will receive an email within a few minutes.
Something went wrong. Try again or contact support if the problem persists.
Screenshot by DoubleXP

Best Minecraft console commands and cheats

There's already a lot you can do in Minecraft. Here is how to do even more.

Ready to get under the hood in Minecraft and start tinkering? The command line will let you tweak game settings, skip long walks, and spawn a variety of interesting and dangerous entities. Inputting these commands is simple. While playing Minecraft, simply bring up the chat window and add your command after the slash. Here are the best Minecraft console commands and cheats.

Recommended Videos

Best Minecraft console commands and cheats

For some of the commands listed below, you may also need the list of id codes for various blocks and status effects. You can find a full list of those codes on the Minecraft Wiki, which will differ depending on your version of the game. You can also use /Help to show the available commands for your platform, and /help followed by a command to get more information on that command.

This is far from an exhaustive list of all commands but provides a selection of useful and common commands that are broadly available on different platforms, with some basic uses for each.

Related: How to make an easy water elevator in Minecraft

Fill in blocks

  • /fill – If you’d like to just create an area dense with a specific block, the fill tool makes that simple. After the command, fill in the X, Y, and Z coordinates, followed by the ID code for the block you want to use.

Chat whisper

  • /tell – Whispering secrets? Follow up the Tell command with a player name, then the message, to send the message directly to them and no one else.

Inventory clear

  • /clear – If you need a way to wipe out yours or another player’s inventory, the /clear command will do that in short order. You can simply type /clear for yourself, or add a space, then a player’s name, to erase their inventory.

Player interaction

  • /effect – The Effect command has a number of uses, but the two most common are applying or removing status effects to players. To apply an effect, simply add a player’s name and the ID code for any effect. To clear them, instead add the word “clear” after the player’s name, where the status ID would go.
  • /enchant – The Enchant command works just like Effect, except it applies an enchantment to the item the targeted player is currently holding, rather than the person themselves.
  • /kill – This one does exactly as it says. You can use a player 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 use, but they both have the same basic functionality; moving players around. The most common use is teleporting yourself to another player or teleporting another player to you. Either way, the first name after the command should be the player you’re trying to move, and the second name is the player at the destination.

Server interactions

  • /op and /deop (Java only) – Use the /op command, followed by a player name, to promote them to an Operator. This will allow them greater access to server commands and settings. If they start abusing their power, the /deop command will strip them of their titles and make them a regular player again.
  • Keep inventory when you die (Java only) – Use /gamerule keepInventory true to change the game rules to allow you to keep your inventory on your person when you die. To revert this, change “true” to “false”.
  • /list – The List command displays a quick rundown of all the players currently connected to the server.
  • /setmaxplayers (Bedrock only) – Need to let more people play? Or maybe things are getting a little too crowded? This command will change the total number of players who can connect to you or your server.

Target selector

If you do not feel like typing an entire player’s name out, you can use the following shortcuts to affect them faster or add a little RNG madness to your world.

  • @p – nearest player
  • @r – random player
  • @a – all players
  • @e – all entities

World interactions

  • /atlantis – Are things a little too dry in your world? Use this command to raise the water levels so only the highest mountains in your server will be above water.
  • /difficulty – The difficulty command lets you change the world’s difficulty settings on the fly. The peaceful setting prevents any hostile mobs from spawning while bumping the difficulty to easy, medium, or hard will make the mobs deal more damage, and render the rules around eating and surviving more difficult. Minecraft has a hardcore mode, where dying causes the world to reset, but it isn’t available as an option here, you have to select it when you create the map.
  • /gamemode – While changing the difficulty will make your Minecraft world more or less forgiving, the Gamemode command lets you swap between Survival, Creative, Adventure, or Spectator Mode. It’s great for editing your adventures, then testing them out, or switching to Creative when you just need a few extra blocks.
  • /locate – Dropping the Locate command in chat will give you the location of the closest structure. If you’re trying to quickly locate a village, mineshaft, or stronghold, this will tell you where to find it.
  • /locate biome (Java only) – using this will point you to the nearest biome.
  • /mobevent – Begins or ends a specified mob event (like a Pillager Raid).
  • /setworldspawn – Punch this command into chat to set the new spawn point for your world right where you’re standing. Alternatively, you can add coordinates on the end to specify a remote point. If you use the /spawnpoint command instead, you can set a player’s personal spawn point.
  • Stop time (Java only) – If you are tired of constantly setting the time to your desired setting, use /gamerule doDaylightCycle false to stop time in its tracks. Replace “false” with “true” to reactivate the time cycle.
  • /summon – Use this command to summon any mob, or a variety of non-block items, into the world around you. You’ll need to use the Entity IDs, found on this Gamepedia page, to actually spawn in the correct mob or item.
  • /time – In lieu of an in-game clock, you can use the Time command to set the current game time, or just find out what time it is now. One of the most common uses is skipping over nighttime in creative mode, which you can do by entering time set 0, which will turn the clock to dawn instantly.
  • /weather – Too rainy for your tastes? The Weather command can change the weather around you by following the command with Clear, Rain, or Thunder. You can leave it blank to set it and let the weather change naturally or add a number of seconds for the downpour to last.

Gamepur is supported by our audience. When you purchase through links on our site, we may earn a small affiliate commission. Learn more about our Affiliate Policy
Author
Image of John Hansen
John Hansen
John Hansen is a Full-time Staff Writer for Gamepur as well as a host for the YouTube channel Pixel Street Videos where he co-hosts a weekly gaming podcast and more. His favorite games include Super Mario 64, The Legend of Zelda: Ocarina of Time, Breath of the Wild, Left 4 Dead 2, and Overwatch. He covers Overwatch 2 and other FPS titles, Minecraft, Sonic the Hedgehog, Legend of Zelda, and whatever zombie games are placed in front of him.