How to Get a Command Block in Minecraft (Java & Bedrock)
Command blocks are one of Minecraft's most powerful tools — but they're deliberately hidden from the normal creative inventory. You won't stumble across one by browsing item tabs, and they're completely unavailable in Survival mode by design. Getting one requires knowing exactly where to look and what permissions need to be in place first.
What Is a Command Block?
A command block is a special in-game block that executes console commands automatically — triggered by redstone, other command blocks, or game events. They're used to build adventure maps, mini-games, custom mechanics, and automated systems that would be impossible with vanilla gameplay alone.
There are three types:
| Type | Color | Behavior |
|---|---|---|
| Impulse | Orange | Runs its command once when activated |
| Chain | Teal/Green | Runs after the command block pointing into it fires |
| Repeat | Purple | Runs its command every game tick while activated |
Each type serves a different role in command block chains, and understanding which one you need matters before you start building.
The Core Requirement: Cheats Must Be Enabled
Before anything else — cheats must be enabled on the world or server. Command blocks are considered a cheat-tier item, so Minecraft gates access to them behind this setting.
- Singleplayer worlds: When creating a world, toggle "Allow Cheats" to ON. If you forgot to do this, you can enable it temporarily by opening the world to LAN and switching cheats on from the pause menu.
- Multiplayer servers: The server operator (or the player with OP permissions) needs to have command block functionality enabled in the
server.propertiesfile. Specifically,enable-command-block=truemust be set. - Realms: Command blocks are not available on Minecraft Realms by default due to platform restrictions.
Without cheats active, the /give command simply won't work for this item.
How to Get a Command Block Using /give 🎮
Once cheats are confirmed on, open the chat window and type the appropriate command:
Java Edition:
/give @p command_block Bedrock Edition:
/give @p command_block 1 The @p selector targets the nearest player (you, in most cases). You can replace @p with a specific username if you're running this on a server and targeting someone else.
For the other command block types:
- Chain command block:
/give @p chain_command_block - Repeat command block:
/give @p repeating_command_block
(Bedrock uses slightly different internal names — if a command fails, try chain_command_block or repeating_command_block with a quantity of 1 appended.)
Creative Mode and the Inventory Search
In Creative mode, you can also find command blocks through the search bar in the item inventory. Type "command" into the search field and all three variants should appear. This is sometimes faster than typing the /give command if you're already in Creative and just need to grab one quickly.
However, this method only works if cheats are enabled — the blocks won't appear as usable items otherwise, even in Creative mode in some versions.
Operator Permissions on Multiplayer Servers
On a server, there's an additional layer: even if command blocks are enabled server-side, only operators (OPs) can place and program them. A regular player with a command block in their inventory won't be able to open its interface.
The permission level for using command blocks is typically OP level 2 or higher, depending on how the server's ops.json is configured. Server admins can grant OP status using:
/op [playername] This is worth understanding if you're building on a shared server — the block itself isn't the only requirement.
Why Command Blocks Aren't in Survival Mode
This is intentional. Command blocks can run any in-game command — including ones that duplicate items, teleport players, change game rules, or alter the world at scale. Allowing Survival players to access them would break the game's core progression entirely.
If you're trying to use command blocks in a Survival-adjacent context (like an adventure map with Survival mechanics), the standard approach is to have a separate admin account or a creative-mode administrator place and configure the blocks, then lock or bury them so players can't interact with them directly.
Variables That Affect Your Specific Setup
How straightforward this process is depends on a few factors that vary by situation:
- Edition — Java and Bedrock handle some command syntax differently, and not all command block behaviors are identical between the two
- Platform — Bedrock on console, mobile, or Windows 10/11 may have different cheat-enabling flows
- Server software — Spigot, Paper, and other third-party server builds sometimes handle command block permissions differently than vanilla
- World type — Superflat or preset worlds behave the same, but some modded environments or data pack setups can interfere with command execution
The command itself is simple. What changes the experience is the environment it's running in — and whether the right permissions are already in place on your specific world or server setup.