Minecraft Commands: The Cheats Every Player Should Know

Minecraft commands turn chat into a console: change game mode, hand out items, teleport, set the time and weather, find structures and rewrite world rules. Here are the commands that matter, how to switch cheats on and what differs between Java and Bedrock.

Minecraft landscape with the headline Minecraft Commands
Illustration: Fox Bulletin

Minecraft commands are text instructions typed into the chat window, starting with a forward slash, that change the world directly: /gamemode creative switches modes, /give hands out items, /tp teleports and /gamerule rewrites the rules of the save. Java Edition lists more than 90 of them, Bedrock shares most of the useful ones, and every one needs cheats enabled or operator status.

This guide covers the commands that matter in ordinary play, grouped by what they do, with the exact syntax for each. It starts with how to turn cheats on, because that is the step most people miss, and ends with the target selectors and coordinate shorthand that make the longer commands work.

Command What it does Edition
/gamemode creative Switch to Creative; survival, adventure and spectator also work Both
/give @s diamond 64 Put items in an inventory; defaults to a full stack if no count Both
/tp 100 64 -200 Teleport to coordinates, a player or an entity Both
/time set day Set the clock; night, noon, midnight or a tick count Both
/weather clear Clear, rain or thunder, with an optional duration Both
/locate structure village Coordinates of the nearest structure, biome or point of interest Both
/gamerule keepInventory true Change a world rule; this one keeps items on death Both
/difficulty peaceful Peaceful removes hostile mobs; easy, normal, hard Both
/effect give @s speed 60 2 Apply a status effect for a duration and level Both
/enchant @s sharpness 5 Enchant the held item Both
/summon zombie ~ ~ ~ Spawn an entity at a position Both
/fill ~ ~ ~ ~10 ~10 ~10 stone Fill a region with a block Both
/kill @e[type=item] Remove entities; without a target it kills you Both
/seed Show the world seed Java (Bedrock shows it in settings)
/op PlayerName Grant operator status on a server Both

How to Enable Minecraft Commands

A Minecraft village and surrounding landscape
Image: Mojang Studios

In a new Java world the switch is the Allow Commands option on the world creation screen. For a world made without it, the command reference documents a temporary route: open the pause menu, choose Open to LAN, turn on Allow Cheats and start the LAN world. Cheats then work until you quit, and the wiki notes that this method remains available up to Java 26.3.

In Bedrock the toggle is in the world settings under Game, labelled Activate Cheats, and it can be changed on an existing world at any time. Turning it on disables achievements for that world on every platform, which is the main reason to keep a separate world for experiments.

On a multiplayer server, commands require operator status, granted with /op followed by the player’s name from the server console or by an existing operator. Java assigns each command a permission level: most gameplay commands need level 2, moderation commands such as /ban and /kick level 3, and server controls such as /stop level 4.

  • New Java world: enable Allow Commands before creating it
  • Existing Java world: Open to LAN, Allow Cheats on, until the next restart
  • Bedrock: world settings, Activate Cheats, any time
  • Server: /op from the console, then level 2 commands are open

Game Mode, Time, Weather and Difficulty

/gamemode takes survival, creative, adventure or spectator, and an optional player name to change someone else. Creative gives flight and infinite blocks, adventure stops block breaking so visitors can tour a build, and spectator lets you fly through walls and watch other players. /defaultgamemode on Java sets what new players spawn into.

/time set accepts day, noon, night and midnight or a tick count from 0 to 24000, and /time add 6000 skips a quarter of a day. /weather clear, rain or thunder changes the sky, with a duration in seconds after the word. To stop the clock entirely, the game rule /gamerule doDaylightCycle false freezes the time of day.

/difficulty moves between peaceful, easy, normal and hard. Peaceful removes every hostile mob and stops hunger draining, which is the quickest rescue from a bad night in a new survival world.

Items, Enchantments and Effects

A large player-built structure in Minecraft
Image: Mojang Studios

/give needs a target, an item and an optional count: /give @s diamond_sword 1 or /give Steve diamond 64. Omit the count and Java hands over a full stack. Item names are the internal ones with underscores, such as golden_apple, netherite_ingot or enchanted_book, and the chat window autocompletes them as you type.

/enchant applies an enchantment to the item in hand, up to that enchantment’s normal maximum: /enchant @s sharpness 5 or /enchant @s mending. /effect give adds a status effect with a duration in seconds and an amplifier, so /effect give @s night_vision 600 1 lasts ten minutes, and /effect clear removes everything.

/clear empties your own inventory, or a named player’s, and /xp add @s 30 levels grants experience in levels or points. Minecraft tops our list of the best-selling video games, and these commands are a large part of why: every adventure map and minigame server is built from them.

Teleporting, Locating and Setting Spawn

/tp and its alias /teleport take three forms: a destination player or coordinates to move yourself, a target then a destination to move someone else, or a target and three coordinates. The order matters: the first name after the command is who moves, the second is where they go. Press F3 on Java to read your current coordinates from the debug screen.

/locate structure returns the coordinates of the nearest named structure, such as village, stronghold, ancient_city or trial_chambers, and /locate biome does the same for cherry_grove or mushroom_fields. Combine the two: locate, then teleport to the result.

/setworldspawn moves where new players appear and /spawnpoint sets one player’s respawn point without a bed. In Java, /spectate attaches a spectator to another entity, and the newer /waypoint command manages the locator bar markers added in the 2025 updates.

  1. Type /locate structure village and read the coordinates in the chat reply
  2. Type /tp followed by those three numbers to jump there
  3. Type /setworldspawn to make it the spawn for everyone, or /spawnpoint for yourself

World Rules and Building Commands

Minecraft gameplay screenshot
Image: Mojang Studios

/gamerule edits the switches that define a world, and the list grows with each release; the version history shows 26.3, released on September 15, 2026, as the current version these commands reflect.

The ones that come up most are keepInventory true, which stops items dropping on death, mobGriefing false, which stops creepers and endermen damaging builds, doDaylightCycle and doWeatherCycle, and randomTickSpeed, which speeds up crop growth. Typing a rule with no value prints its current setting.

/fill replaces every block in a box defined by two corners, so /fill ~ ~ ~ ~10 ~10 ~10 air clears a cube and /fill ~ ~-1 ~ ~20 ~-1 ~20 stone lays a floor. /setblock places one block, and /clone copies a region to a new position, which is how builders duplicate a wing of a castle in one line.

/summon spawns any entity at a position, from a zombie to a lightning_bolt, and /kill @e[type=item] clears dropped items that are slowing a world. On Java, /execute chains conditions and runs commands as other entities, which is the foundation of most command-block contraptions, and /function runs a file of commands from a data pack.

Target Selectors and Coordinates

Selector Who it targets
@p The nearest player
@a Every player
@e Every entity, including mobs and items
@s The entity running the command
@r A random player

Selectors replace player names and accept filters in square brackets. @e[type=zombie] picks every zombie, @a[distance=..10] every player within ten blocks, and @e[type=item] every dropped item. Combining them is how /kill and /tp stay precise instead of catching the wrong thing.

Coordinates use two shorthands. A tilde means relative to where you stand, so ~ ~10 ~ is ten blocks straight up, and a caret means relative to the direction you face, so ^ ^ ^5 is five blocks ahead. Typing three tildes alone means your exact position, which is why /summon and /fill examples start with them.

Java and Bedrock Differences Worth Knowing

The core set is shared: gamemode, give, tp, time, weather, locate, gamerule, effect, enchant, summon, fill, kill, setblock, clone and the server commands. Java adds data manipulation with /data and /item, advancement and attribute commands, /seed, /spectate and the full /execute grammar. Bedrock lists its seed in the world settings instead and uses a simpler execute syntax.

Item and entity names also diverge in places, and Bedrock accepts some numeric data values Java dropped years ago. When a command fails with a red error on one edition, the wiki keeps a page per command with both syntaxes side by side. Players who learned the console through Sims 4 cheats will find the same slash-and-argument pattern here.

Frequently Asked Questions

How do you turn on cheats in Minecraft?

On Java, enable Allow Commands when creating the world, or use Open to LAN with Allow Cheats on an existing one. On Bedrock, switch on Activate Cheats in the world settings. On a server, an operator grants /op.

What is the command for creative mode?

/gamemode creative. Use /gamemode survival to return, and add a player name after the mode to change someone else.

How do you teleport in Minecraft?

/tp followed by a player name, or by X, Y and Z coordinates. /tp PlayerA PlayerB moves the first player to the second. Find structures first with /locate structure.

Do Minecraft commands disable achievements?

On Bedrock, turning on cheats disables achievements for that world. On Java, advancements are unaffected, but commands only work once Allow Commands or Open to LAN cheats are enabled.

Related Articles

Written by Marcus Feltz

Marcus Feltz handles sport and gaming at Fox Bulletin, writing the record-book rankings and the working code lists that Roblox players rely on. Every codes page is rebuilt from each game's own channels on each pass, and a code that stops redeeming is moved down to the expired list the same day.

View all posts →

Get the Fox Bulletin briefing

The stories that matter, in your inbox. No spam, unsubscribe anytime.

Newsletter signup will be available soon.