iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Godlike.Host offers hosted Minecraft Java servers with its own game panel, SFTP access and free DDoS protection, if you would rather not host it yourself.
To get a command block, enable commands or cheats in the world and run the command for your edition. In Bedrock Edition, open chat and enter /give @p command_block. In Java Edition, enter /give @p minecraft:command_block. A command block is not craftable through the ordinary crafting table.
Bedrock calls the required setting Activate Cheats (also shown as Allow Cheats in some menus), while Java calls it Allow Commands. You generally need Creative mode to edit a command block, and multiplayer players may need operator or Operator Commands permission. Enabling cheats in a Bedrock world permanently disables achievements for that world, so make a copy first if achievements matter.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
Minecraft | Java & Bedrock Deluxe Collection | Windows Digital Code | $39.99 | Buy on Amazon |
| 2 |
|
Minecraft | Java & Bedrock Ultimate Collection | Windows Digital Code | $49.99 | Buy on Amazon |
| 3 |
|
Minecraft | Standard Edition | XBOX Digital Code | $19.99 | Buy on Amazon |
| 4 |
|
Minecraft | $6.99 | Buy on Amazon |
| 5 |
|
Minecraft - Bedrock Edition PS4 | $42.98 | Buy on Amazon |
What a command block is—and why you cannot craft one
A command block is a placeable block that runs a Minecraft command when it receives a redstone signal or another configured trigger. It is intended for automation, adventure maps, minigames, teleport systems, custom messages, and other command-based builds.
Unlike stone, iron, or redstone components, it has no standard crafting recipe. Microsoft’s command-block tutorial states that “Command blocks can only be obtained by running a command.” Looting chests, smelting materials, or combining items will not produce one. The reliable method is to obtain it with /give after commands are enabled.
#1 Best Overall
- DELUXE COLLECTION — Includes Minecraft: Java & Bedrock Edition, three Bedrock add-ons, three exclusive Character Creator items, and 700 Minecoins.
- CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
- EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
- SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
- PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).
Requirements before you run the command
Enable the correct world setting
The command cannot run in a world where commands or cheats are disabled. The label depends on the edition:
| Edition | World setting | Item identifier | Achievement effect |
|---|---|---|---|
| Bedrock Edition | Activate Cheats or Allow Cheats | command_block |
Enabling cheats disables achievements for that world. |
| Java Edition | Allow Commands | minecraft:command_block |
The supplied official guidance does not state an equivalent Bedrock achievement consequence. |
In Java, you can enable Allow Commands while creating a world. In an existing single-player world, use the game’s command-enabling workflow, then return to the world and run the command. In Bedrock single-player, open the world’s settings, go to the Game tab, and turn on Allow Cheats or Activate Cheats, depending on the current menu wording.
Use a world where you have the required permissions
On a local world, the person who owns or opens the world controls these settings. On a server or Realm, the host or administrator must grant the permission needed to use commands. Minecraft’s documentation refers to this as Operator Commands permission in Bedrock. Without it, the command may be rejected even when the server itself permits command blocks.
Rank #2
- ULTIMATE COLLECTION — Includes Minecraft: Java & Bedrock Edition, five Bedrock add-ons, five exclusive Character Creator items, and 1000 Minecoins.
- CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
- EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
- SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
- PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).
Plan for Creative mode when editing
Microsoft notes that command blocks can only be edited in Creative mode. You may be able to obtain or place the block while playing another mode, but the command interface is not available until you switch to Creative and have the necessary permission. If you want to continue a survival project, switch temporarily, configure the block, and switch back only after testing.
Commands for each edition
Open the in-game chat window and enter the command exactly as shown. The leading slash is part of the normal chat-command syntax.
Bedrock Edition command
Run:
/give @p command_block
@p targets the nearest player, normally the player entering the command. The item name is command_block, without the Java namespace prefix.
Rank #3
- CREATE YOUR WORLD — Build whatever you imagine in an infinite world that is unique in every playthrough.
- EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world full of surprises.
- SURVIVAL ADVENTURES — Face mysterious foes, travel across varied landscapes, and venture into perilous dimensions.
- PLAY TOGETHER — Play solo or join friends in local split-screen and cross-platform play across console, mobile, and PC. Online multiplayer supports up to 8 players.
- COMMUNITY PLAY — Connect with players on community servers, or subscribe to Realms Plus (sold separately) to play with up to 10 friends on a private server.
Java Edition command
Run:
/give @p minecraft:command_block
Java’s documented item identifier includes the minecraft: namespace. Leaving that identifier out can cause an unknown-item or invalid-command error, depending on the version and command parser.
How to get a command block in Bedrock Edition
- Open the world settings. From the Play screen, select the world and choose its edit or settings control. If you are already inside the world, pause the game and open Settings.
- Open the Game tab. Find the cheats section. Turn on Activate Cheats or Allow Cheats. Confirm the warning that appears.
- Understand the achievement consequence. Bedrock marks the world as having cheats enabled, and achievements are disabled for that world. This is a world-level consequence, not merely a temporary chat setting.
- Return to the world. Open chat using the chat key or button for your platform.
- Enter the command. Type
/give @p command_block, then send it. The command block should be added to your inventory if you have permission. - Switch to Creative to configure it. If the block will not open for editing, change your game mode to Creative and verify your Operator Commands permission. Place the block, interact with it, enter the command you want it to run, and choose its execution settings.
- Test before building around it. Supply the trigger it needs, such as a button, lever, pressure plate, or redstone circuit, and confirm that the command produces the intended result.
How to get a command block in Java Edition
- Enable commands. When creating the world, turn on Allow Commands. For an existing single-player world, use Java’s command-enabling option for that session or world, then return to gameplay.
- Open chat. Use the chat key and make sure the cursor is in the command-entry field rather than ordinary text chat.
- Run the Java command. Enter
/give @p minecraft:command_blockand send it. A successful command places the item in the nearest player’s inventory. - Use Creative for editing. Microsoft’s guidance recommends Creative when starting because command blocks can only be edited there. If the interface does not open, change to Creative and check that your player has command or operator access.
- Place and configure the block. Select it from your inventory, place it, interact with it in Creative, and enter the command that should run. Set the block’s execution options and connect the appropriate redstone trigger.
- Return to your preferred game mode. After testing, switch back if the world is intended to be played in Survival or another mode. Keep commands enabled if the command block must continue operating.
Can you get one in Survival?
There is no ordinary Survival recipe and no natural collection method described by the official guidance. “Getting one in Survival” therefore means using an enabled command to put it in your inventory, not crafting it from Survival materials. The world must allow commands, and your account must have permission to run them.
Editing is a separate issue. Even after the block is in your inventory, the official guidance says command blocks can only be edited in Creative mode. A practical workflow is to back up the world, enable the required command setting, obtain the block, switch to Creative to configure and test it, and then return to Survival. In Bedrock, achievements remain disabled for that world after cheats are enabled, even if you later switch back to Survival.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #4
- Skins! We have biome settlers, city folk, town folk, and more!
- The Nether and all its inhabitants. Fight Ghasts and make friends with Pigmen
- Cross platform play for up to five players between Pocket Edition and Windows 10
- Revamped touch controls, controller support, and a controller mapping screen
- Enhanced Weather effects! Accumulating snow and more
Multiplayer, servers, and Realms
When the command says you lack permission
Ask the host or server administrator to grant the appropriate operator or command permission. A regular player cannot bypass a server’s permission system by changing the item identifier. The administrator may also need to enable command blocks or commands in the server’s configuration; the exact control depends on the server software and is not established by the edition command alone.
When another player receives the block
@p means the nearest player to the command’s execution location. If an administrator runs the command while several players are nearby, the item may go to the administrator or another nearby player rather than the person who requested it. Have the intended recipient stand closest to the command source, or have that player run the command themselves after receiving permission.
Editing someone else’s command block
Creative mode and operator-level access still matter after the item has been obtained. If a placed block cannot be opened, verify both conditions rather than repeatedly entering the /give command.
Best Value
- Play and share with friends on console, mobile and Windows 10
- discover community creations in the new in-game store
- access new mini games and game modes through servers
How to place and configure the block
- Move the command block from your inventory to an active hotbar slot.
- Place it on a suitable surface like any other placeable block.
- In Creative mode, interact with the block to open its configuration screen.
- Enter the command the block should execute. Commands in the block’s command field are entered according to the interface; follow the field’s current syntax and omit any extra chat formatting the screen does not request.
- Choose the execution behavior offered by your edition, such as whether the block requires redstone, runs once or repeatedly, or is conditional.
- Connect the required redstone component or configure the neighboring command blocks in your chain.
- Trigger it in a controlled test area. If the command changes blocks, teleports players, or affects a large area, test on a copy first.
The /give command only supplies the item. It does not automatically configure a command, activate the block, or grant other players permission.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteTroubleshooting: why the command does not work
“Unknown command,” “you do not have permission,” or no response
- Confirm that the world has Allow Commands (Java) or Activate Cheats/Allow Cheats (Bedrock) enabled.
- In multiplayer, ask the host or administrator for operator or Operator Commands permission.
- Check that you are in the intended world; enabling cheats in one world does not enable them in another.
- Make sure you sent the message as a command, beginning with
/, rather than posting ordinary chat text.
The item identifier is rejected
- Bedrock uses
command_block. - Java uses
minecraft:command_block. - Do not combine the Bedrock identifier with Java command syntax or vice versa.
- Check that you are actually playing the edition you think you are; menus and command parsers differ between Java and Bedrock.
The block is in the inventory but cannot be edited
- Switch to Creative mode, which Microsoft identifies as the mode for editing command blocks.
- Verify Operator Commands or equivalent operator permission, especially on a server or Realm.
- Interact with the placed block rather than trying to edit the inventory icon.
The command runs but targets the wrong player
Review the selector. @p chooses the nearest player to the command source. Move the intended recipient closer or have that player run the /give command directly.
You need achievements to remain available
Do not enable cheats in the original Bedrock world. Make a copy first if you want to experiment with command blocks. The official Bedrock guidance says achievements are disabled for a world once cheats are enabled; switching cheats off later does not restore that world’s achievement eligibility.
Java versus Bedrock: quick decision guide
| Question | Java Edition | Bedrock Edition |
|---|---|---|
| What setting enables the command? | Allow Commands | Activate Cheats or Allow Cheats |
| What item identifier is used? | minecraft:command_block |
command_block |
| What command should you enter? | /give @p minecraft:command_block |
/give @p command_block |
| What is required for editing? | Creative mode and sufficient command access | Creative mode and Operator Commands or equivalent access |
| What happens to achievements? | The supplied official guidance does not state a Bedrock-style achievement consequence. | Achievements are disabled for that world after cheats are enabled. |
Safe workflow for an existing world
If the world contains a long-running Survival project, treat command enabling as an irreversible decision for Bedrock achievements. Export or copy the world before changing settings. Use the copy to obtain and configure the command block, test its trigger and effects, and only then decide whether the original world should remain untouched or whether the changed copy is acceptable.
For a shared world, coordinate with the owner before changing settings. A player who can run /give may still lack the authority to alter world permissions, switch modes, or edit another player’s command block. Record which edition the world uses and copy the edition-specific command exactly; most failures come from using the other edition’s identifier or from missing permissions rather than from the command block item itself.
Free tools Windows power users keep installed
One-click scans. No signup required.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

