• Guides
  • Cheats
  • Tech
  • Talk
  • Culture
  • CONTACT
  • Bahasa Indonesia
Reading: Minecraft Commands: Complete Java and Bedrock Guide
Share
FOLLOW NOSPHIRE
Logo Wordtura
  • Home
  • Latest & Popular
  • Reviews
  • Categories
    • Press Releases
    • Tech
    • Talk
    • Reviews
    • Culture
    • Guides
    • Cheats
  • Partners
    • Event Partners
    • Press Partners
  • About
    • About Wordtura
    • About Game Reviews
    • About Product & Service Reviews
  • Bookmarks
  • Bahasa Indonesia
Reading: Minecraft Commands: Complete Java and Bedrock Guide
Share
WordturaWordtura
Font ResizerAa
Search
  • Bahasa Indonesia
  • Home
  • Latest & Popular
  • Reviews
  • Categories
    • Press Releases
    • Tech
    • Talk
    • Reviews
    • Culture
    • Guides
    • Cheats
  • Partners
    • Event Partners
    • Press Partners
  • About
    • About Wordtura
    • About Game Reviews
    • About Product & Service Reviews
  • Bookmarks
Follow US
©Wordtura. Design by Nosphire. All rights reserved.
Wordtura > Cheats > Minecraft Commands: Complete Java and Bedrock Guide
Cheats

Minecraft Commands: Complete Java and Bedrock Guide

Vanilla commands for Java and Bedrock, with ready-to-use examples.

Anggara Prima Nanda
Last updated: 29/11/2026 7:43 PM
Anggara Prima Nanda
Share
45 Min Read
Ilustrasi command Minecraft Java dan Bedrock dengan Steve, Alex, command block, serta contoh /give, /tp dan /gamemode
SHARE

Minecraft commands let you give yourself items, travel instantly, control the weather, change world rules, and build without placing every block by hand. These commands are built into the game, so there is no need to install mods or download cheat software.

Contents
How to enable Minecraft commandsJava Edition (PC)Bedrock Edition (mobile, Windows, and consoles)Minecraft commands syntax: target selectors and coordinatesMinecraft commands for game modes and difficultyMinecraft commands for items, enchantments, and XPMinecraft commands for survival supplies and building materialsMinecraft commands for weapon, tool, and armor enchantmentsMinecraft commands for inventory and recipesMinecraft commands for experience points and levelsMinecraft commands for teleportation, spawn points, and locating placesFinding structures, dungeons, and other biomesMinecraft commands for dimension travelMinecraft commands for time, weather, and world rulesMinecraft commands for keep inventory, mobs, time, and damageAdditional game rules for survival, farming, and multiplayerMinecraft commands for status effects and mobsMinecraft commands for survival: health, hunger, speed, and protectionMinecraft commands for player attributes (Java)Minecraft commands for summoning and riding mobsMinecraft commands for building and editing blocksCreating builds, saving structures, and editing biomesCommand blocks, scoreboards, and automationScoreboards, conditions, and advanced functionsMinecraft commands for simulation speed (Java)Minecraft commands for servers, communication, and edition-specific featuresMinecraft commands for display, sound, and camera controlsAdditional Minecraft commands for server administratorsMinecraft commands for advancements (Java)Why are Minecraft commands not working?

However, Minecraft commands do not always follow the same syntax in Java and Bedrock Edition. For example, the argument order for status effects and experience levels differs. Java updates have also changed the names of game rules. This guide covers survival cheats, item codes, enchantments, status effects, game rules, teleportation, building, map creation, and vanilla server administration. It provides ready-to-use examples rather than every possible item ID, subcommand, or argument. Unless marked otherwise, examples are intended for both modern editions.

How to enable Minecraft commands

Before running Minecraft commands that change the world, make sure you have permission. Commands such as /help may be available without operator privileges, but most cheats require additional settings.

Java Edition (PC)

  • When creating a new world, enable Allow Commands (called Allow Cheats in older versions).
  • For an existing world in Java 26.3, press Esc, open World Options, and enable Allow Commands under General. In many older versions, select Open to LAN, enable Allow Commands or Allow Cheats, and start the LAN world. LAN permissions in those older versions are temporary.
  • Press T or / to open chat, enter a command starting with a forward slash, and press Enter. Use Tab to see suggested arguments.

Bedrock Edition (mobile, Windows, and consoles)

  • Open the world settings (Settings > Game), then enable Cheats or Activate Cheats, depending on your version.
  • Open chat using the controls on your device, type the command with a leading slash, and send it.
  • Enabling cheats in Bedrock permanently disables achievements for that world, even if you turn cheats off again. Make a copy of your world before enabling them if you want to preserve achievements.

On servers and Realms, certain Minecraft commands require operator permissions. The official Minecraft guide explains permissions and how to use chat. Hardcore worlds have additional restrictions, so do not assume every option is available.

Minecraft commands syntax: target selectors and coordinates

Pay attention to the target required by Minecraft commands. For example, /give @s minecraft:diamond 16 gives 16 diamonds to the player executing it. Change the final number to the amount you need.

  • @s: the entity executing the command, usually yourself when you type it in chat.
  • @p: the player nearest to the execution position.
  • @a: all players matching the filters.
  • @r: one random player.
  • @e: entities, including players, mobs, and items. Use filters to narrow the selection.
  • @e[type=zombie]: zombie entities only.

Minecraft commands that accept coordinates follow the order X, Y, Z. X and Z indicate horizontal position, while Y represents height. The example /tp @s 100 80 -200 uses absolute coordinates. /tp @s ~ ~5 ~ moves you five blocks up from the execution position. The tilde (~) indicates a relative position, while the caret (^) uses local directions based on the execution orientation.

I recommend using @s when trying Minecraft commands on yourself. Using @a or @e without filters can affect many players at once, including friends who are still playing.

Minecraft commands for game modes and difficulty

  • /gamemode survival @s: return to Survival Mode.
  • /gamemode creative @s: switch to Creative Mode to fly and access the creative inventory.
  • /gamemode adventure @s: restrict block interactions according to Adventure Mode rules.
  • /gamemode spectator @s: observe the world without normal interactions in versions that support Spectator Mode.
  • /difficulty peaceful: set the difficulty to Peaceful.
  • /difficulty normal: set the difficulty to Normal.
  • /difficulty hard: set the difficulty to Hard.
  • /defaultgamemode survival: Java Edition, set the default game mode for players. Use /gamemode to change a specific player’s mode.

To make Survival easier without switching to Creative, one of the simplest Minecraft commands is /difficulty easy. Game mode and difficulty are separate settings: Creative grants access to the creative inventory, while Easy retains Survival mechanics.

Minecraft commands for items, enchantments, and XP

  • /give @s minecraft:diamond 64: give yourself 64 diamonds.
  • /give @s minecraft:netherite_sword 1: give yourself a netherite sword.
  • /give @s minecraft:command_block 1: obtain a command block. Permission is still required to use it.
  • /clear @s minecraft:diamond: remove diamonds from your inventory.
  • /enchant @s sharpness 5: apply Sharpness V to the compatible sword you are holding.
  • /enchant @s unbreaking 3: apply Unbreaking III to a compatible item.

The /enchant command respects vanilla enchantment level limits and compatibility rules. If the game rejects it, check that you are holding the correct item. Avoid using /clear without an item ID if you want to keep your inventory.

Minecraft commands for survival supplies and building materials

The following Minecraft commands work in both modern editions. Every example targets @s and gives items to your own inventory. Adjust the final quantity as needed; non-stackable items occupy separate slots.

  • /give @s minecraft:cooked_beef 64: a supply of cooked food.
  • /give @s minecraft:golden_apple 16: golden apples for recovery and extra protection.
  • /give @s minecraft:enchanted_golden_apple 5: enchanted golden apples, a rarer consumable.
  • /give @s minecraft:torch 64: light up caves or your base.
  • /give @s minecraft:coal 64: fuel and material for crafting torches.
  • /give @s minecraft:iron_ingot 64: material for tools, armor, and machinery.
  • /give @s minecraft:netherite_ingot 16: material for upgrading diamond equipment. Smithing still requires the usual prerequisites.
  • /give @s minecraft:diamond_pickaxe 1: a diamond pickaxe.
  • /give @s minecraft:netherite_pickaxe 1: a netherite pickaxe.
  • /give @s minecraft:diamond_helmet 1: a diamond helmet.
  • /give @s minecraft:diamond_chestplate 1: a diamond chestplate.
  • /give @s minecraft:diamond_leggings 1: diamond leggings.
  • /give @s minecraft:diamond_boots 1: diamond boots.
  • /give @s minecraft:shield 1: a shield.
  • /give @s minecraft:bow 1: a bow.
  • /give @s minecraft:arrow 64: arrows.
  • /give @s minecraft:elytra 1: wings for gliding. Normal use still follows Elytra mechanics.
  • /give @s minecraft:ender_pearl 16: ender pearls for teleportation.
  • /give @s minecraft:ender_eye 16: eyes of ender for locating strongholds or activating End portals.
  • /give @s minecraft:obsidian 64: material for Nether portals or building.
  • /give @s minecraft:water_bucket 1: a bucket of water.
  • /give @s minecraft:bone_meal 64: speed up the growth of plants that respond to bone meal.
  • /give @s minecraft:oak_log 64: oak logs for crafting building materials.
  • /give @s minecraft:redstone 64: redstone dust for circuits and mechanisms.

If an item ID is rejected, check chat autocomplete or /help. Inventory names can be localized, but Minecraft commands still use the game’s internal IDs. Items from mods or add-ons are not automatically available in vanilla worlds.

Minecraft commands for weapon, tool, and armor enchantments

Hold the item you want to enchant before running the following Minecraft commands. These examples use levels normally available for vanilla enchantments in both editions.

  • /enchant @s efficiency 5: speed up the use of compatible tools.
  • /enchant @s fortune 3: improve the chance of extra drops from blocks that support Fortune.
  • /enchant @s silk_touch 1: collect certain blocks in their original form.
  • /enchant @s mending 1: repair compatible items as you earn XP.
  • /enchant @s protection 4: general protection for armor.
  • /enchant @s feather_falling 4: reduce fall damage when applied to boots.
  • /enchant @s respiration 3: extend underwater breathing time when applied to a helmet.
  • /enchant @s aqua_affinity 1: improve underwater mining when applied to a helmet.
  • /enchant @s looting 3: increase loot drops from mobs that support Looting.
  • /enchant @s power 5: increase bow damage.
  • /enchant @s infinity 1: save regular arrows when firing a bow, subject to the enchantment’s conditions.
  • /enchant @s fire_aspect 2: set a target on fire after a compatible attack.
  • /enchant @s knockback 2: increase knockback from attacks.
  • /enchant @s depth_strider 3: move faster underwater when applied to boots.

Fortune and Silk Touch cannot normally be combined. Infinity and Mending are also incompatible on bows. The /enchant command cannot force enchantment levels beyond vanilla limits.

Minecraft commands for inventory and recipes

  • Replace your main-hand item. Java: /item replace entity @s weapon.mainhand with minecraft:diamond_sword 1. Bedrock: /replaceitem entity @s slot.weapon.mainhand 0 minecraft:diamond_sword 1. The previous item will be overwritten, so put important equipment somewhere safe first.
  • Replace your helmet. Java: /item replace entity @s armor.head with minecraft:diamond_helmet 1. Bedrock: /replaceitem entity @s slot.armor.head 0 minecraft:diamond_helmet 1. Avoid this if your existing helmet has enchantments you still need.
  • Remove up to five diamonds. Java: /clear @s minecraft:diamond 5. Bedrock: /clear @s minecraft:diamond 0 5. In Bedrock, 0 is the item data value and 5 is the maximum quantity to remove.
  • /recipe give @s *: Java: unlock all recipes that can be granted through the command. It does not provide crafting materials.
  • /recipe take @s *: Java: remove recipes that can be revoked from the recipe book.
  • /loot give @s loot minecraft:chests/simple_dungeon: Java: give random loot from a dungeon loot table. The results can vary.

Bedrock also provides /recipe and /loot, but their arguments and loot table identifiers do not always match Java. Enter /help recipe or /help loot to check the syntax available in your version.

Minecraft commands for experience points and levels

Minecraft commands for XP use different formats in Java and Bedrock. Experience points are not the same as levels, so 30 points do not equal 30 levels.

  • /xp add @s 30 levels: Java: add 30 levels.
  • /xp 30L @s: Bedrock: add 30 levels.
  • /xp add @s 100 points: Java: add 100 experience points.
  • /xp 100 @s: Bedrock: add 100 experience points.
  • /xp set @s 30 levels: Java: set your level to 30 instead of adding 30 levels.

Minecraft commands for teleportation, spawn points, and locating places

  • /tp @s 100 80 -200: teleport to the specified coordinates.
  • /tp @s NamaTeman: teleport to another player. Replace NamaTeman with the name of an online player.
  • /tp @s ~10 ~ ~: move ten blocks along the X axis.
  • /spawnpoint @s ~ ~ ~: set your personal respawn point at your current position.
  • /setworldspawn ~ ~ ~: set the world spawn point.
  • /locate structure #minecraft:village: Java: find a village structure using the village tag.
  • /locate structure minecraft:village: Bedrock: find a village.
  • /locate biome minecraft:desert: find a desert biome.
  • /locate structure minecraft:stronghold: find a stronghold.

Minecraft commands such as /locate report a location rather than teleporting you there. Check your current dimension and look for a safe surface before entering the Y coordinate. If the height is unknown, do not guess in Survival: you could arrive in midair, inside a block, or above lava. In Java, F3 helps you check your position. In Bedrock, enable Show Coordinates in the world settings.

Finding structures, dungeons, and other biomes

These Minecraft commands use /locate to find places without wandering around at random. Search the Overworld for Overworld-only structures, the Nether for fortresses and bastions, and the End for End Cities. Do not expect every world to have these structures near spawn.

  • /locate structure minecraft:ancient_city: locate an Ancient City.
  • /locate structure minecraft:trial_chambers: locate Trial Chambers in versions that include them.
  • /locate structure minecraft:mansion: locate a Woodland Mansion.
  • /locate structure minecraft:monument: locate an Ocean Monument.
  • /locate structure minecraft:pillager_outpost: locate a Pillager Outpost.
  • /locate structure minecraft:fortress: locate a Nether Fortress.
  • /locate structure minecraft:bastion_remnant: locate a Bastion Remnant.
  • /locate structure minecraft:end_city: locate an End City.
  • /locate biome minecraft:cherry_grove: locate a Cherry Grove biome.
  • Find Mushroom Fields. Java: /locate biome minecraft:mushroom_fields; Bedrock: /locate biome minecraft:mushroom_island.
  • /locate biome minecraft:deep_dark: locate a Deep Dark biome.
  • Find the Badlands. Java: /locate biome minecraft:badlands; Bedrock: /locate biome minecraft:mesa.

The biome examples use the minecraft: namespace, which modern Bedrock requires and Java accepts. Mushroom Fields and Badlands have different IDs in the two editions. Available structure names depend on your edition and version. If autocomplete does not show an ID, look for the name your game provides instead of forcing Minecraft commands from another edition.

Minecraft commands for dimension travel

  • /tp @s ~ ~ ~10: move ten blocks along the Z axis.
  • /tp @s ^ ^ ^5: move five blocks forward based on the execution orientation. Check that the destination is unobstructed.
  • /spreadplayers 0 0 10 50 false @a: Java: spread players around X=0 and Z=0, with a minimum separation of 10 blocks and a range of 50 blocks. The false argument disables grouping by team.
  • /spreadplayers 0 0 10 50 @a: Bedrock: spread players within the specified horizontal area.
  • /execute in minecraft:overworld run tp @s 0 100 0: Java: teleport yourself to these coordinates in the Overworld.
  • /execute in minecraft:the_nether run tp @s 0 80 0: Java: travel to the Nether. Check the destination because the coordinates may be inside blocks or above lava.
  • /execute in minecraft:the_end run tp @s 100 70 0: Java: travel to the End. There may be no solid ground at the destination.
  • /clearspawnpoint @s: Bedrock: remove a player’s personal spawn point.
  • /spectate: Java: stop spectating the entity you are following in Spectator Mode.

Before using Minecraft commands for cross-dimensional teleportation, try them in a copy of your world or in Creative or Spectator Mode. The coordinates above demonstrate syntax; they are not guaranteed safe destinations.

Minecraft commands for time, weather, and world rules

  • /time set day: set the time to morning in the Overworld.
  • /time set noon: set the time to noon.
  • /time set night: set the time to night.
  • /weather clear: stop rain or thunderstorms.
  • /weather rain: start rain in biomes that support it.
  • /weather thunder: start a thunderstorm.

Since Java 26.1, the World Clocks system has expanded the /time command. In the Overworld, /time pause and /time resume pause and resume the world clock respectively in Java 26.1 or later. Do not copy these last two commands into Bedrock.

Minecraft commands for keep inventory, mobs, time, and damage

The syntax of Minecraft commands for game rules changed in Java Edition 1.21.11. Game rule names now use lowercase letters and underscores, and some were renamed entirely. Java 1.21.10 and earlier use the old names. Bedrock did not adopt these Java naming changes.

  • Keep your inventory after death: Java 1.21.11+ /gamerule minecraft:keep_inventory true; older Java /gamerule keepInventory true; Bedrock /gamerule keepinventory true.
  • Stop the day-night cycle: Java 1.21.11+ /gamerule minecraft:advance_time false; older Java /gamerule doDaylightCycle false; Bedrock /gamerule dodaylightcycle false.
  • Stop automatic weather changes: Java 1.21.11+ /gamerule minecraft:advance_weather false; older Java /gamerule doWeatherCycle false; Bedrock /gamerule doweathercycle false.
  • Prevent mobs from damaging blocks: Java 1.21.11+ /gamerule minecraft:mob_griefing false; older Java /gamerule mobGriefing false; Bedrock /gamerule mobgriefing false.
  • Stop natural mob spawning: Java 1.21.11+ /gamerule minecraft:spawn_mobs false; older Java /gamerule doMobSpawning false; Bedrock /gamerule domobspawning false.

To reverse a Boolean setting in Minecraft commands using /gamerule, change true to false or vice versa according to the rule’s function. Disabling mob griefing does not make players immune to Creeper explosions and may affect other mob behavior. Spawning rules do not automatically remove existing mobs. Enter a game rule name without a value to see its current setting.

Additional game rules for survival, farming, and multiplayer

The following Minecraft commands change world rules. Three formats are shown because Java 1.21.11 renamed game rules; older Java refers to versions before that change. These settings apply to the world, not just one player.

  • Disable fall damage. Java 1.21.11+: /gamerule minecraft:fall_damage false; older Java: /gamerule fallDamage false; Bedrock: /gamerule falldamage false. Useful when building at height.
  • Disable fire damage. Java 1.21.11+: /gamerule minecraft:fire_damage false; older Java: /gamerule fireDamage false; Bedrock: /gamerule firedamage false. Prevents damage to players from fire-related sources covered by the rule.
  • Disable drowning damage. Java 1.21.11+: /gamerule minecraft:drowning_damage false; older Java: /gamerule drowningDamage false; Bedrock: /gamerule drowningdamage false. This is different from granting Water Breathing.
  • Disable freezing damage. Java 1.21.11+: /gamerule minecraft:freeze_damage false; older Java: /gamerule freezeDamage false; Bedrock: /gamerule freezedamage false. Useful when crossing powder snow.
  • Stop Phantoms from spawning. Java 1.21.11+: /gamerule minecraft:spawn_phantoms false; older Java: /gamerule doInsomnia false; Bedrock: /gamerule doinsomnia false. Existing Phantoms do not disappear automatically.
  • Respawn without the death screen. Java 1.21.11+: /gamerule minecraft:immediate_respawn true; older Java: /gamerule doImmediateRespawn true; Bedrock: /gamerule doimmediaterespawn true. It does not preserve your inventory by itself; use keep inventory for that.
  • Increase random tick speed. Java 1.21.11+: /gamerule minecraft:random_tick_speed 20; older Java: /gamerule randomTickSpeed 20; Bedrock: /gamerule randomtickspeed 20. This can accelerate the growth of certain plants, leaf decay, and other random processes.
  • Allow one player to skip the night by sleeping. Java 1.21.11+: /gamerule minecraft:players_sleeping_percentage 0; older Java: /gamerule playersSleepingPercentage 0; Bedrock: /gamerule playerssleepingpercentage 0. At least one player still has to sleep.

The Minecraft commands for restoring default random tick speed are /gamerule minecraft:random_tick_speed 3 in modern Java, /gamerule randomTickSpeed 3 in older Java, and /gamerule randomtickspeed 1 in Bedrock. Avoid extreme values: random processes can strain the server and affect more than crops.

  • /gamerule minecraft:fire_spread_radius_around_player 0: Java 1.21.11+: stop fire spreading using the new rule.
  • /gamerule doFireTick false: Java before 1.21.11: disable fire updates, including its spread.
  • /gamerule dofiretick false: Bedrock: disable fire spread and updates.
  • /gamerule showcoordinates true: Bedrock: display coordinates on screen.
  • /gamerule showcoordinates false: Bedrock: hide coordinates.
  • /gamerule pvp false: Bedrock: prevent players from attacking each other through PvP mechanics. In older Java versions, PvP is generally a server configuration setting. Newer Java versions may offer a PvP game rule if it appears in autocomplete.
  • /gamerule tntexplodes false: Bedrock: prevent TNT from exploding.
  • /daylock true: Bedrock: lock the day-night cycle.
  • /daylock false: Bedrock: allow the time cycle to resume.

Check the Minecraft Wiki game rule reference for other game rule names and version changes. Before changing multiplayer world rules, note their original values so you can restore them later.

Minecraft commands for status effects and mobs

For Minecraft commands using /effect, Java requires give or clear after the command name, while Bedrock places the target directly after it. Ordinary effect durations are measured in seconds. Amplifier 0 means level I, and amplifier 1 means level II.

  • /effect give @s minecraft:night_vision 600 0 true: Java: Night Vision for 10 minutes with particles hidden.
  • /effect @s night_vision 600 0 true: Bedrock: a similar result.
  • /effect give @s minecraft:speed 60 1: Java: Speed II for one minute.
  • /effect @s speed 60 1: Bedrock: Speed II for one minute.
  • /effect clear @s: Java: remove all effects from yourself.
  • /effect @s clear: Bedrock: remove all effects from yourself.
  • /summon minecraft:horse ~ ~ ~: summon a horse.
  • /summon minecraft:villager ~ ~ ~: summon a villager.
  • /kill @e[type=zombie]: kill matching zombies within the command’s execution scope.

Use a distance filter when running Minecraft commands such as /kill to remove only nearby zombies: /kill @e[type=zombie,distance=..20] in Java or /kill @e[type=zombie,r=20] in Bedrock. Do not use /kill @e without understanding its effects; other entities, including pets, players, and dropped items, can be affected.

Minecraft commands for survival: health, hunger, speed, and protection

To make Survival easier without changing rules for the entire world, use Minecraft commands based on /effect. You can adjust the duration and amplifier. These examples provide equivalent effects for both editions. For instant effects, the duration argument is not the length of a lasting buff.

  • Restore health. Java: /effect give @s minecraft:instant_health 1 4. Bedrock: /effect @s instant_health 1 4. Heals the player instantly without increasing maximum health.
  • Restore hunger and saturation. Java: /effect give @s minecraft:saturation 1 4. Bedrock: /effect @s saturation 1 4. Helps refill the hunger bar and saturation.
  • Regenerate health. Java: /effect give @s minecraft:regeneration 120 1. Bedrock: /effect @s regeneration 120 1. Restores health periodically for two minutes.
  • Mine faster. Java: /effect give @s minecraft:haste 600 1. Bedrock: /effect @s haste 600 1. Haste II for ten minutes.
  • Increase attack strength. Java: /effect give @s minecraft:strength 300 1. Bedrock: /effect @s strength 300 1. Strength II for five minutes.
  • Reduce damage. Java: /effect give @s minecraft:resistance 300 1. Bedrock: /effect @s resistance 300 1. Resistance II does not grant complete immunity to every damage source.
  • Resist fire and lava. Java: /effect give @s minecraft:fire_resistance 600 0. Bedrock: /effect @s fire_resistance 600 0. Fire Resistance for ten minutes.
  • Breathe underwater. Java: /effect give @s minecraft:water_breathing 600 0. Bedrock: /effect @s water_breathing 600 0. Water Breathing for ten minutes.
  • Fall slowly. Java: /effect give @s minecraft:slow_falling 300 0. Bedrock: /effect @s slow_falling 300 0. Helps you land without fall damage while the effect is active.
  • Jump higher. Java: /effect give @s minecraft:jump_boost 120 1. Bedrock: /effect @s jump_boost 120 1. Jump Boost II. Keep the increased jump height in mind.
  • Temporarily increase maximum health. Java: /effect give @s minecraft:health_boost 300 1. Bedrock: /effect @s health_boost 300 1. Increases health capacity while the effect is active.
  • Add absorption hearts. Java: /effect give @s minecraft:absorption 300 1. Bedrock: /effect @s absorption 300 1. Adds a layer of yellow hearts.
  • Become invisible. Java: /effect give @s minecraft:invisibility 300 0 true. Bedrock: /effect @s invisibility 300 0 true. Armor and held items may still be visible.

For a buff with no time limit in supported Java versions, use /effect give @s minecraft:night_vision infinite 0 true. Modern Bedrock also supports /effect @s night_vision infinite 0 true if infinite appears in autocomplete. Remove buffs using /effect clear @s (Java) or /effect @s clear (Bedrock).

Minecraft commands for player attributes (Java)

In modern Java, Minecraft commands based on /attribute can alter base attributes without granting potion effects. The IDs below use the modern format; older versions may use the generic prefix. Changes to base values remain until you change them back.

  • /attribute @s minecraft:max_health base get: read your base maximum health.
  • /attribute @s minecraft:max_health base set 40: raise base maximum health to 40 points (20 hearts). Use a healing effect if needed to fill the additional hearts.
  • /attribute @s minecraft:max_health base reset: restore base maximum health to its default in versions that support reset.
  • /attribute @s minecraft:movement_speed base set 0.2: increase base movement speed. Start with a small value so movement remains manageable.
  • /attribute @s minecraft:movement_speed base reset: restore base movement speed.
  • /attribute @s minecraft:scale base set 0.5: shrink the player in versions that support the scale attribute.
  • /attribute @s minecraft:scale base reset: restore the player’s default scale.
  • /damage @s 2: Java and Bedrock: attempt to deal two points of damage to yourself. The result depends on your protection and current condition.

Bedrock does not provide /attribute in the Java format. Use status effects for temporary boosts. In Java, /attribute base reset has been available since 1.21.4. Avoid extreme values.

Minecraft commands for summoning and riding mobs

  • /summon minecraft:iron_golem ~ ~ ~: summon an Iron Golem.
  • /summon minecraft:wolf ~ ~ ~: summon a wolf, which is not necessarily tamed.
  • /summon minecraft:cat ~ ~ ~: summon a cat.
  • /summon minecraft:cow ~ ~ ~: summon a cow.
  • /summon minecraft:sheep ~ ~ ~: summon a sheep.
  • /summon minecraft:allay ~ ~ ~: summon an Allay.
  • /summon minecraft:axolotl ~ ~ ~: summon an axolotl, preferably in water.
  • /summon minecraft:camel ~ ~ ~: summon a camel in versions that support it.
  • /summon minecraft:bee ~ ~ ~: summon a bee.
  • /summon minecraft:lightning_bolt ~ ~ ~: summon lightning. It can start fires or transform mobs, so use it away from your base.
  • /ride @s mount @e[type=horse,sort=nearest,limit=1]: Java: mount the nearest horse if you are not already riding another entity.
  • /ride @s start_riding @e[type=horse,c=1]: Bedrock: attempt to mount the nearest rideable horse.
  • /ride @s dismount: Java: dismount the entity you are riding.
  • /ride @s stop_riding: Bedrock: dismount the entity you are riding.
  • /testfor @e[type=zombie,r=10]: Bedrock: check for zombies within ten blocks.
  • /execute if entity @e[type=zombie,distance=..10] run say Zombie dekat!: Java: display a message if a zombie is within ten blocks.

Minecraft commands that summon animals do not automatically tame them or give them specific equipment. In Bedrock, /ride is limited to vehicle and passenger combinations permitted by the entity data.

Minecraft commands for building and editing blocks

  • /setblock ~ ~-1 ~ minecraft:stone: replace the block below the execution position with stone.
  • /fill ~1 ~ ~1 ~5 ~3 ~5 minecraft:glass hollow: make a hollow glass room using two corners.
  • /fill ~1 ~ ~1 ~5 ~ ~5 minecraft:stone: create a 5 × 5 stone floor.
  • /fill ~1 ~ ~1 ~5 ~3 ~5 minecraft:air: clear the specified area.
  • /clone 100 64 100 104 68 104 120 64 120: copy an area defined by two corner coordinates to a destination.
  • /setblock ~1 ~ ~ minecraft:air: remove a block on the positive X side.

The area limits for Minecraft commands such as /fill and /clone depend on the edition, version, and world rules. Start small because both commands can overwrite existing builds without confirmation. Back up the world first and make sure important structures are not in the destination area.

Creating builds, saving structures, and editing biomes

These additional Minecraft commands are useful for maps and construction projects. Try them in a small area without important buildings first.

  • /fill ~1 ~ ~1 ~10 ~4 ~10 minecraft:stone outline: create an outer shell of stone in the specified area.
  • /fill ~1 ~ ~1 ~10 ~ ~10 minecraft:glass replace minecraft:stone: replace only stone blocks in the specified plane with glass.
  • /setblock ~1 ~ ~ minecraft:torch: place a torch if the position and support are suitable.
  • /setblock ~1 ~ ~ minecraft:redstone_block: place a redstone block beside the player.
  • /fillbiome ~ ~ ~ ~15 ~15 ~15 minecraft:plains: Java: change the biome in the specified area. It does not automatically replace existing blocks, trees, or buildings.
  • /place structure minecraft:desert_pyramid ~ ~ ~: Java: attempt to place a desert pyramid at the execution position. World generation requirements can affect success.
  • /structure save rumah 100 64 100 110 74 110: Bedrock: save an area named rumah (house). Use coordinates from your own build.
  • /structure load rumah 120 64 120: Bedrock: load the saved rumah structure at a new location. Destination blocks may be overwritten.
  • /structure delete rumah: Bedrock: delete the saved structure named rumah.
  • /forceload add ~ ~: Java: keep the chunk containing the player loaded.
  • /forceload remove ~ ~: Java: remove the force-load setting for that chunk.
  • /tickingarea add circle ~ ~ ~ 1 markas: Bedrock: create a ticking area named markas (base) with a radius of one chunk.
  • /tickingarea list: Bedrock: list active ticking areas.
  • /tickingarea remove markas: Bedrock: remove that ticking area.

Minecraft commands for force-loading and ticking areas keep automated machines running, but too many active areas can strain the world or server. Bedrock also offers /place for placing features or structures, with different syntax and permissions. Check /help place before using it.

Command blocks, scoreboards, and automation

To run Minecraft commands automatically in an adventure map or minigame, use a command block. Obtain one with /give @s minecraft:command_block if you have permission, switch to Creative Mode, place the block, and open its settings. Impulse runs a command when triggered, Repeat runs it repeatedly while active, and Chain is used for sequences. Select Needs Redstone while testing so your mechanism does not immediately run continuously.

  • /execute as @a at @s run particle minecraft:heart ~ ~2 ~: Java: run a particle command at each player’s location.
  • /execute as @a at @s run say Halo: Java and Bedrock: run the command as each player at their own location.
  • /scoreboard objectives add poin dummy: create an objective named poin (points).
  • /scoreboard players add @s poin 1: add one point to your score through chat.
  • /scoreboard objectives setdisplay sidebar poin: display the objective in the sidebar.
  • /scoreboard objectives remove poin: remove the objective and its stored scores.
  • /tag @s add builder: add the builder tag to yourself.
  • /tag @s remove builder: remove that tag.

Minecraft commands can be triggered with a button using an Impulse command block, as in the following example. The nearest player receives bread. Test it once before switching to Repeat so inventories do not keep filling up.

give @p minecraft:bread 3

Minecraft commands entered in command blocks do not need the leading slash. The @s selector does not automatically refer to the player who pressed the button because the command block is not a player. For more complex maps, learn how /execute and selector filters work before building automatic sequences.

Scoreboards, conditions, and advanced functions

The following Minecraft commands use the previously created objective poin. If it does not exist yet, create it with /scoreboard objectives add poin dummy.

  • /scoreboard players set @s poin 10: set your score to 10.
  • /scoreboard players remove @s poin 2: subtract two points.
  • /scoreboard players reset @s poin: remove your score from the objective.
  • /scoreboard objectives list: list available objectives.
  • /execute if score @s poin matches 10.. run say Target tercapai!: modern Java and Bedrock: display a message if the player’s score is at least 10.
  • /execute if block ~ ~-1 ~ minecraft:stone run say Di atas batu: modern Java and Bedrock: check the block one step below the execution position.
  • /give @p minecraft:bread 3: give bread to the nearest player. A practical example for a command block reward.

To run several Minecraft commands at once, use /function contoh:hadiah in Java if a data pack containing the function contoh:hadiah has been installed. Bedrock uses /function hadiah if a behavior pack contains the function hadiah. These are example file names that you must create yourself, not built-in Minecraft functions. In Java, /schedule function contoh:hadiah 10s schedules the function to run ten seconds later.

Minecraft commands for simulation speed (Java)

  • /tick query: check tick information and the target tick rate.
  • /tick freeze: pause most simulation activity. Players and vehicles they are riding can still move.
  • /tick step 20: advance 20 ticks while the simulation is frozen.
  • /tick unfreeze: resume the simulation.
  • /tick rate 10: slow the target simulation rate to 10 ticks per second.
  • /tick rate 20: restore the target to 20 ticks per second.

The /tick command has been available since Java 1.20.3. It requires sufficient permissions and cannot be run from a command block. Unlike random tick speed, /tick affects the game’s simulation more broadly.

Minecraft commands for servers, communication, and edition-specific features

  • /say Selamat datang!: send an announcement.
  • /msg NamaTeman Halo: send a private message to a player.
  • /list: list online players.
  • /kick NamaTeman: disconnect a player from the server if you have permission.
  • /op NamaTeman: grant operator privileges. Only give them to people you trust.
  • /deop NamaTeman: revoke operator privileges.
  • /seed: Java: display the world seed with the appropriate permissions.
  • /worldborder set 1000: Java: set the world border diameter to 1,000 blocks.
  • /data get entity @s: Java: read a player’s NBT data without modifying it.
  • /testfor @a: Bedrock: check whether matching players exist.
  • /title @a title Selamat datang: Bedrock: show a title on players’ screens.
  • /title @a title {"text":"Selamat datang"}: Java: display a title using a text component.

Some Minecraft commands for administration are limited to certain server types and cannot always be run from normal chat. In Java, /data and item components provide data controls that differ from Bedrock. Since Java 1.20.5, many older /give examples that use item NBT need to be adapted to item component syntax. Do not copy complex Java examples directly into Bedrock.

Minecraft commands for display, sound, and camera controls

If you are making an adventure map or minigame, these Minecraft commands help display instructions, play effects, and control the point of view.

  • Show an actionbar message. Java: /title @s actionbar {"text":"Misi dimulai!"}. Bedrock: /title @s actionbar Misi dimulai!. A short message appears on the player’s screen.
  • Send a formatted text message. Java: /tellraw @s {"text":"Selamat datang!"}. Bedrock: /tellraw @s {"rawtext":[{"text":"Selamat datang!"}]}. Java and Bedrock use different text component formats.
  • Play the level-up sound. Java: /playsound minecraft:entity.player.levelup master @s ~ ~ ~. Bedrock: /playsound random.levelup @s ~ ~ ~. Sound IDs differ between the editions.
  • /stopsound @s: stop sounds playing through the sound system for the target player.
  • /title @s clear: clear the displayed title and subtitle.
  • /particle minecraft:heart ~ ~2 ~: Java: create heart particles above the execution position.
  • /particle minecraft:basic_flame_particle ~ ~2 ~: Bedrock: create flame particles above the execution position.
  • /camera @s set minecraft:third_person: Bedrock: switch to a third-person perspective.
  • /camera @s set minecraft:free pos 100 80 100 facing 100 64 100: Bedrock: place a free camera facing the specified coordinates.
  • /camera @s clear: Bedrock: restore the normal camera.
  • /inputpermission set @s movement disabled: Bedrock: disable movement controls, for example during a cutscene.
  • /inputpermission set @s movement enabled: Bedrock: re-enable movement controls.
  • /camerashake add @s 0.3 1 positional: Bedrock: shake the camera for one second if the player’s settings permit it.
  • /camerashake stop @s: Bedrock: stop camera shake.

Always prepare the commands to restore camera and movement controls before applying these effects to other players. The Bedrock camera system documentation explains preset behavior and limitations.

Additional Minecraft commands for server administrators

These Minecraft commands depend on your permission level and server type. Do not restrict access without understanding the consequences. Replace the example name NamaTeman with the correct player name.

  • /whitelist on: Java dedicated server: enable the list of players allowed to join.
  • /whitelist add NamaTeman: Java dedicated server: add a player to the whitelist.
  • /whitelist remove NamaTeman: Java dedicated server: remove a player from the whitelist.
  • /whitelist list: Java dedicated server: list the players allowed to join.
  • /allowlist on: Bedrock dedicated server: enable the allowlist.
  • /allowlist add NamaTeman: Bedrock dedicated server: add a player to the allowlist.
  • /allowlist list: Bedrock dedicated server: display the allowlist.
  • /ban NamaTeman: Java dedicated server: ban a player from joining.
  • /pardon NamaTeman: Java dedicated server: remove the ban.
  • /save-all: Java dedicated server: request that the server save world data.
  • /stop: dedicated server: shut down the server. Inform players of the planned shutdown first.

In Bedrock, some administrative options are available only in the server console rather than player chat. Servers with plugins may add their own commands. This guide covers vanilla Minecraft commands; plugin features are not treated as standard game features.

Minecraft commands for advancements (Java)

Use /advancement to manage advancement progress in a Java world. This differs from Bedrock account achievements, which cannot be unlocked with the same command. Use a test world to avoid losing your original progress.

  • /advancement grant @s only minecraft:story/shiny_gear: grant the advancement related to diamond equipment.
  • /advancement revoke @s only minecraft:story/shiny_gear: revoke that advancement.
  • /advancement grant @s everything: grant every loaded advancement. Some may award rewards or XP.
  • /advancement revoke @s everything: remove all of the player’s advancement progress. Do not run this on your main world without a backup.

Why are Minecraft commands not working?

  • Unknown or incomplete command: check the command name, Minecraft version, permissions, and autocomplete suggestions. Do not translate command names.
  • Syntax error: check the order of arguments. Use examples for the correct edition, especially for /effect, /xp, and /gamerule.
  • No targets matched selector: the target was not found. Make sure players are online, the mob type is correct, and the distance filter is not too restrictive.
  • Minecraft commands run but produce unexpected results: check the dimension, execution position, and whether the server uses plugins that replace built-in commands. Use a copy of the world for experiments that could delete blocks or items.

If the Minecraft commands you need are not listed, type /help in the game to see the available commands. Bedrock supports /help effect to show help for a specific command. For a full index, including less common technical commands, consult the Minecraft Wiki command list and the official Microsoft Learn reference for Bedrock. Check the Java 26.3 release notes if your settings menu differs from older versions.

Minecraft commands are useful for testing building designs, managing a world with friends, or reducing grinding in a private world. If you play other games with built-in cheats, Wordtura also has a The Sims 4 PC cheats guide covering money, skills, and Build Mode.

Keep your articles in Wordtura Baca

The app has its own bookmarks. Browse them by category or download an article to read offline.

Get Wordtura Baca

You Might Also Like

GTA 6 Cheats for PS5 and Xbox: Codes and How to Use
Witcher 3 PC Cheats: Console Commands and Item Codes
The Sims 4 PC Cheats: Base Game and DLC
TAGGED:MinecraftMinecraft BedrockMinecraft Java
SOURCES:Minecraft: How to Use CommandsMicrosoft Learn: Minecraft Bedrock CommandsMinecraft: Java Edition 1.21.11Minecraft: Java Edition 26.1Minecraft: Java Edition 26.3Minecraft Wiki: CommandsMinecraft Wiki: Game ruleMicrosoft Learn: Bedrock Camera SystemMicrosoft Learn: Structure CommandMinecraft Wiki: Tick CommandMicrosoft Learn: Locate CommandMinecraft Wiki: Advancement Command
VIA:Wordtura editorial research and curation
Share This Article
Facebook Email Print
Leave a Comment Leave a Comment

Leave a Reply Cancel reply

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

Meet Nosphire

Watch on YouTube

Latest Reviews

Review Call of Juarez: Gunslinger
Game Reviews

Call of Juarez: Gunslinger Review, Tall Tales That Keep the Gunfights Fun

28/11/2026
Review SIFU PC
Game Reviews

Sifu Review: Even Easy Mode Can Be Frustrating

08/11/2026
Review Palworld
Game Reviews

Palworld 1.0 Review: Fun Pals, Lonely Solo Experience

08/11/2026
DOOM 2016
Game Reviews

DOOM (2016) Review: Brutal Combat, Frustrating Crashes

08/11/2026
Review Ace Combat 8
Game Reviews

Ace Combat 8 Review: Great Dogfights, Weak Multiplayer

08/11/2026
Review Black Squad
Game Reviews

Black Squad Review (2026): Great Gunplay, Few Players

08/11/2026

Follow Nosphire

Youtube Tiktok Instagram

Contact Wordtura

Partnerships & Services

©Wordtura. Design by Nosphire. All Rights Reserved.

Logo Wordtura

Enjoy Nosphire’s writing and videos?
Support the next project through Trakteer.

Support Nosphire

Policies

  • Privacy Policy
  • Editorial Policy
  • Terms of Service
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?