← All command pages

Minecraft Commands: Full Java and Bedrock List (2026)

How to turn on cheats in Minecraft, the most used commands and the full command list, separately for Java and Bedrock (mobile, console), with one-click copy.

Opening the console and turning on cheats

Turning on cheats (commands)

  • Java: Turn on Allow Commands when creating the world. In an existing world you can toggle it in the in-game World Options menu. (In older versions the option was called Allow Cheats.)
  • Bedrock (Windows, mobile, Xbox, PlayStation, Switch): Turn on Allow Cheats in the Cheats tab of the world settings.

Careful: In Bedrock, turning cheats on in a world permanently stops achievements in that world, even if you turn cheats off later. If you're hunting achievements, try cheats in a separate world.

Typing commands: Open chat with T, or with / directly. Commands start with /; Tab completes the command and its arguments. On mobile and console, tap the chat button.

Target selectors: @s you, @p nearest player, @a all players, @r a random player, @e all entities (mobs, items...).

Most used commands (ready examples)

Copy and paste into chat. Ones with an edition label are written this way only in that edition; unlabeled ones work in both.

CommandWhat it does
/gamemode creative Switches to Creative mode.
/gamemode survival Switches to Survival mode.
/give @s diamond 64 Gives you 64 diamonds. Replace diamond with any item name.
/time set day Sets the time to day. Use night for night.
/weather clear Clears the weather (stops rain and storms).
/gamerule keep_inventory true Java You keep your items and XP when you die.
/gamerule keepinventory true Bedrock You keep your items and XP when you die.
/gamerule advance_time false Java Stops the day-night cycle.
/gamerule dodaylightcycle false Bedrock Stops the day-night cycle.
/gamerule mob_griefing false Java Creepers and other mobs can't destroy or change blocks.
/gamerule mobgriefing false Bedrock Creepers and other mobs can't destroy or change blocks.
/gamerule showcoordinates true Bedrock Shows your coordinates on screen. (In Java, press F3.)
/locate structure #village Java Gives the coordinates of the nearest village.
/locate structure village Bedrock Gives the coordinates of the nearest village.
/locate biome desert Finds the nearest desert. Use any other biome name instead.
/tp @s 0 100 0 Teleports you to the coordinates (x y z).
/effect give @s night_vision infinite 0 true Java Gives you night vision forever.
/effect @s night_vision infinite 0 true Bedrock Gives you night vision forever.
/enchant @s sharpness 5 Puts Sharpness V on the item you're holding.
/xp add @s 30 levels Java Gives you 30 experience levels.
/xp 30L @s Bedrock Gives you 30 experience levels.
/kill @e[type=item] Careful Removes all dropped items.
/difficulty peaceful Sets difficulty to Peaceful: no hostile mobs.
/summon lightning_bolt Strikes lightning where you are.
/seed Java Shows the world seed.
/clear @s Careful Empties your whole inventory.

Player, items and game mode

CommandWhat it does
/gamemode Changes game mode: survival, creative, adventure, spectator.
/defaultgamemode Sets the game mode new players start in.
/give Gives an item to a player.
/clear Clears items from a player's inventory.
/effect Adds or removes status effects.
/enchant Enchants the item a player is holding.
/xp (experience) Adds or sets experience points or levels.
/kill Careful Kills players, mobs or removes items.
/spawnpoint Sets a player's respawn point.
/clearspawnpoint Bedrock Removes a player's spawn point.
/recipe Gives or takes recipes.
/advancement Java Grants, revokes or checks advancements.
/attribute Java Reads or changes entity attributes (health, speed, scale...).
/ability Bedrock Grants or revokes a player ability (e.g. flying).
/damage Deals damage to entities.
/item Java Changes items in inventories.
/replaceitem Bedrock Replaces an item in an inventory slot.
/loot Drops or gives items from a loot table.

World, time and weather

Since Java 1.21.11, game rule names use underscores (keep_inventory). Older Java versions use the old names (keepInventory).

CommandWhat it does
/time Sets or queries the time of day (set day, set night...).
/weather Sets the weather: clear, rain, thunder.
/toggledownfall Bedrock Toggles rain on and off.
/daylock (alwaysday) Bedrock Locks or unlocks the day-night cycle.
/difficulty Sets the difficulty: peaceful, easy, normal, hard.
/gamerule Sets or queries game rules.
/setworldspawn Sets the world spawn.
/locate Finds the nearest structure or biome.
/worldborder Java Manages the world border.
/fillbiome Java Changes the biome of an area.
/forceload Java Keeps chunks loaded all the time.
/tickingarea Bedrock Adds, removes or lists ticking areas.
/tick Java Controls the game tick rate: freeze, speed up.
/mobevent Bedrock Toggles mob events (e.g. pillager patrols).
/immutableworld Bedrock Sets whether the world is immutable.

Teleporting and movement

CommandWhat it does
/tp (teleport) Teleports players or entities to a place or to someone.
/spreadplayers Teleports entities to random spots in an area.
/spectate Java Makes a spectator-mode player watch through an entity.
/ride Makes an entity ride another, or dismount.
/rotate Java Changes an entity's rotation.

Building and blocks

CommandWhat it does
/fill Fills an area with a block.
/setblock Changes the block at a position.
/clone Copies blocks from one place to another.
/place Places a structure, feature or template.
/structure Bedrock Saves and loads structures.
/testforblock Bedrock Tests whether a block is at a position.
/testforblocks Bedrock Tests whether two areas match.

Mobs and entities

CommandWhat it does
/summon Summons a mob or entity.
/tag Adds or removes entity tags.
/team Java Manages teams.
/data Java Reads or changes block and entity NBT data.
/event Bedrock Triggers an event on an entity.
/playanimation Bedrock Plays a one-off animation on an entity.
/testfor Bedrock Counts entities that match conditions.

Messages, sound and screen

CommandWhat it does
/say Sends a message to everyone.
/msg (tell, w) Sends a private message to a player.
/me Displays an action message about you.
/teammsg (tm) Java Sends a message to your team.
/tellraw Sends a formatted (JSON) message.
/title Shows big text in the middle of the screen.
/titleraw Bedrock Shows a formatted (JSON) title.
/particle Creates particles.
/playsound Plays a sound.
/stopsound Stops a sound.
/music Bedrock Plays or stops music tracks.
/bossbar Java Creates and edits boss bars.
/camera Bedrock Custom camera angles and screen fades.
/camerashake Bedrock Adds a camera shake effect.
/fog Bedrock Manages fog settings.
/hud Bedrock Hides or shows HUD elements.
/waypoint Java Manages waypoints on the locator bar.

Command blocks and advanced

CommandWhat it does
/execute Runs another command conditionally or as another entity.
/function Runs a function.
/schedule Runs a function after a delay.
/scoreboard Manages scoreboard objectives and scores.
/trigger Java Lets a player set a trigger score.
/return Java Controls flow and return value inside functions.
/random Java Draws a random value.
/reload Reloads data and behavior packs.
/datapack Java Enables, disables and lists data packs.
/stopwatch Java Creates real-time stopwatches.
/help (?) Lists commands and how to use them.

Server and multiplayer

Most server commands need operator (OP) permission.

CommandWhat it does
/op Gives a player operator status.
/deop Removes operator status.
/list Lists players on the server.
/kick Kicks a player.
/ban Java Bans a player.
/ban-ip Java Bans an IP address.
/pardon Java Unbans a player.
/pardon-ip Java Unbans an IP address.
/banlist Java Shows the ban list.
/whitelist (allowlist) Manages the server whitelist.
/publish Java Opens a single-player world to LAN.
/save-all Java Saves the server now.
/save-off Java Turns off automatic saving.
/save-on Java Turns on automatic saving.
/save Bedrock Prepares a backup or checks its status.
/stop Stops the server.
/setidletimeout Java Sets the idle kick time.
/setmaxplayers Bedrock Sets the maximum number of players.
/transfer Transfers a player to another server.
/version Java Shows the server's game version.
/permission (ops) Bedrock Reloads permissions.

FAQ

How do I turn on cheats in Minecraft?

In Java, turn on Allow Commands when creating the world or use the in-game World Options menu. In Bedrock, turn on Allow Cheats in the Cheats tab of the world settings.

keepInventory doesn't work. Why?

In Java 1.21.11 and later the game rule is called keep_inventory: /gamerule keep_inventory true. In Bedrock it's /gamerule keepinventory true.

Does turning on cheats disable achievements?

In Bedrock, yes: once you turn cheats on in a world, achievements are permanently disabled in that world.

Why are Java and Bedrock commands different?

The two editions have separate codebases. Most commands share names, but some are written differently (e.g. /xp and /effect) and some exist in only one edition. Use the Java / Bedrock buttons at the top to see only your edition's commands.

Command names and syntax were compiled from Minecraft Wiki (CC BY-NC-SA); the explanations are ours. Commands can change when the game updates.