Minecraft commands list with syntax for Java and Bedrock

Minecraft Commands List: Every Cheat Worth Knowing

Commands turn Minecraft from a survival game into a sandbox you control completely. You can skip the night, hand yourself a stack of diamonds, teleport across the world, or find the nearest stronghold without wandering for an hour. This Minecraft commands list covers the ones worth memorising, written with their exact syntax, plus the target selectors and gamerules that make them far more powerful than they first appear.

How to Enable Cheats First

Commands only work if cheats are enabled for the world you are in.

  • Java Edition: turn on Allow Cheats when creating the world. On an existing world, pause, choose Open to LAN, set Allow Cheats to On and start the LAN world. Cheats stay active for that session.
  • Bedrock, mobile and console: open the world settings, find the Cheats section and switch Activate Cheats on. Be aware this disables achievements for that world permanently.
  • Servers: you need operator status. Run op yourname from the server console.

Open the chat window with T on Java or the chat button on mobile, then type a forward slash to begin a command.

Target Selectors

Most commands take a target. Instead of typing a player name every time, use these shortcuts. They work in almost every command that accepts a player or entity.

SelectorMeans
@sYourself, whoever ran the command
@pThe nearest player
@aAll players
@rA random player
@eAll entities, including mobs and dropped items

You can filter selectors with arguments in square brackets. @e[type=zombie,distance=..20] targets every zombie within twenty blocks, which combined with /kill clears an area instantly.

Essential Minecraft Commands

CommandWhat it does
/gamemode creativeSwitch to creative. Also survival, adventure, spectator.
/time set daySkip to morning. Also night, noon, midnight.
/weather clearStop rain or a thunderstorm.
/tp @s 100 64 -200Teleport yourself to those coordinates.
/give @s diamond 64Give yourself a stack of any item.
/kill @e[type=creeper]Remove every creeper currently loaded.
/seedShow the world seed.
/locate structure minecraft:strongholdFind the nearest structure and its coordinates.
/locate biome minecraft:cherry_groveFind the nearest biome of that type.
/difficulty peacefulChange difficulty, or remove hostile mobs entirely.
/effect give @s night_vision 999 1Apply a status effect for a set duration.
/enchant @s sharpness 5Enchant the item you are holding.
/summon minecraft:villagerSpawn any entity where you are standing.
/setblock 10 64 10 minecraft:stonePlace a single block at exact coordinates.
/fill 0 64 0 10 70 10 minecraft:airFill or clear a whole region at once.
/spawnpointSet your respawn point where you stand.
/clear @sEmpty your inventory, or clear one item type.

/locate is the one most players underuse. It will point you at a stronghold, an Ancient City, a Woodland Mansion or a Nether fortress without any searching, which pairs well with the coordinates in our best Minecraft seeds collection.

Gamerules Worth Knowing

Gamerules change how the world itself behaves, and they persist until you change them back. The syntax is /gamerule ruleName value.

GameruleEffect
keepInventory trueKeep your items when you die. The most-used rule in the game.
doDaylightCycle falseFreeze time where it is.
doWeatherCycle falseStop weather changing.
doMobSpawning falseStop all natural mob spawning.
mobGriefing falseCreepers stop destroying blocks, endermen stop moving them.
doFireTick falseFire stops spreading. Useful in wooden builds.
doImmediateRespawn trueSkip the death screen entirely.
randomTickSpeed 10Crops and trees grow much faster. Default is 3.
showcoordinates trueDisplay coordinates on screen. Bedrock only; Java uses F3.

Be careful with randomTickSpeed. Setting it very high will grow your crops instantly and may also drop your frame rate to single digits.

Multiplayer and Server Commands

CommandWhat it does
/op playernameGrant operator permissions.
/deop playernameRemove them again.
/whitelist add playernameAllow a player onto a whitelisted server.
/kick playername reasonRemove a player from the session.
/ban playernameBlock a player permanently. /pardon reverses it.
/msg playername textSend a private message. /tell and /w do the same.
/say textBroadcast a message to everyone.
/listShow who is currently online.

If you are setting up a world for friends, our guide to making a Minecraft server covers the configuration these commands sit on top of.

Java and Bedrock Command Differences

Most commands are identical across editions, but there are real gaps worth knowing about.

  • Experience: Java uses /xp or /experience; Bedrock uses /xp only.
  • Game modes: Bedrock accepts numbers as well as names, so /gamemode 1 works the same as /gamemode creative.
  • Java only: /datapack, /advancement, /attribute, /spectate and the full /team system.
  • Bedrock only: /fog, /camerashake, /mobevent and /structure.
  • Coordinates: Bedrock needs /gamerule showcoordinates true, while Java players press F3.

Our Java and Bedrock comparison covers the wider differences between the two versions.

Tips for Using Commands

  • Press Tab to autocomplete. It fills in item names, structure IDs and coordinates, which saves you from typos in long identifiers.
  • Use the tilde for relative coordinates. /tp @s ~ ~10 ~ moves you ten blocks up from wherever you are.
  • Press the up arrow in chat to repeat your last command.
  • Test on a copy of your world before running /fill over a large area. It is not undoable.
  • Namespaces are optional in most cases. minecraft:stone and stone both work.

Useful Command Combinations

Individual commands are handy. Combining them with selectors and relative coordinates is where they become genuinely powerful.

  • /kill @e[type=item] clears every dropped item on the ground. Useful after a large build when thousands of stray blocks are hurting your frame rate.
  • /tp @a @s teleports every player on the server to you, which is far faster than reading coordinates out loud.
  • /fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 minecraft:stone lays a flat 11×11 platform under your feet, anywhere, instantly.
  • /effect give @s minecraft:night_vision 99999 0 true gives you permanent night vision with the particle effects hidden, which is the single best quality-of-life command for building.
  • /time set day followed by /gamerule doDaylightCycle false locks the world in permanent daylight so nothing spawns while you build.
  • /give @s minecraft:diamond_pickaxe{Enchantments:[{id:efficiency,lvl:5}]} gives you a pre-enchanted tool on Java. Bedrock uses /enchant on a held item instead.
  • /locate structure minecraft:ancient_city then /tp to the coordinates it returns turns a long expedition into two commands.

Relative coordinates with the tilde symbol are the key to most of these. ~ means your current position on that axis, so ~10 is ten blocks along it. The caret symbol works similarly but relative to the direction you are facing, which is useful for commands you run while looking at something.

Frequently Asked Questions

Do commands disable achievements?

On Bedrock, yes. Turning cheats on disables achievements for that world permanently. On Java, advancements keep working with cheats enabled.

How do I turn on cheats in a world I already started?

On Java, pause the game, choose Open to LAN, set Allow Cheats to On and start the LAN world. On Bedrock, open the world settings and enable cheats there.

What is the command to keep items after dying?

/gamerule keepInventory true. It applies to the whole world and stays set until you change it back.

Can I use commands on mobile?

Yes. Mobile runs Bedrock Edition, so every Bedrock command works. Enable cheats in world settings and use the chat button to type them.

Why does my command say I do not have permission?

Cheats are off, or you are not an operator on that server. Single-player worlds need Allow Cheats enabled; servers need you to be opped from the console.

Similar Posts

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *