Command blocks are only available in Creative mode and require cheats enabled

A command block is a special block in Minecraft that runs commands when activated. You cannot find it in Survival mode or obtain it through normal gameplay — you must be in Creative mode, have cheats turned on, or use commands yourself. The fastest way is to switch to Creative mode, where command blocks sit in the creative inventory ready to place.

If you want to keep your world in Survival mode, you can still get a command block by typing a single command. This requires cheats to be enabled on your world, which you can toggle on at any time if you created the world yourself.

Key Takeaways

  • Creative mode gives you instant access to command blocks in your inventory without any setup.
  • Survival mode requires cheats to be enabled before you can summon a command block with a command.
  • The command to summon a command block is /give @s command_block, which you type in the chat window.
  • Command blocks only work when powered by redstone, so you need a redstone signal to activate them.
  • Different command block types (Impulse, Chain, Repeat) run commands in different ways, and you change the type by right-clicking the block.

Getting a command block in Creative mode

Open your creative inventory by pressing E (on Java Edition) or the inventory button on your controller. Scroll through the tabs until you reach the "Redstone" section. Command blocks appear in this tab alongside other redstone components like repeaters and comparators.

Click the command block to grab it, then place it anywhere in your world. You can place multiple copies. Right-click the block to open its interface and type the command you want it to run.

Getting a command block in Survival mode with cheats

First, turn on cheats. If you created the world yourself, pause the game and go to "Open to LAN". Toggle "Allow Cheats" to on, then unpause. If someone else created the world, you cannot turn on cheats unless they do it first.

Once cheats are on, open the chat window by pressing T (Java) or the right arrow button (Bedrock). Type the command /give @s command_block and press Enter. A command block will appear in your inventory immediately. You can now place it and use it like in Creative mode.

If you want multiple command blocks, you can repeat this command as many times as you need, or modify it to give a specific number: /give @s command_block 64 gives you 64 command blocks at once.

Understanding the three command block types

Command blocks come in three varieties, and you switch between them by right-clicking the block. Each type runs commands differently.

Impulse blocks (orange) run their command once when they receive a redstone signal. This is the default type. Chain blocks (green) run when the block pointing into them finishes, creating a sequence. Repeat blocks (purple) run their command every game tick as long as they are powered by redstone, which means they run 20 times per second.

For most simple tasks, Impulse blocks are what you need. Chain blocks let you build sequences where one command triggers the next. Repeat blocks are useful for constant effects, like continuously spawning particles or checking a condition over and over.

Powering a command block with redstone

A command block does nothing until it receives a redstone signal. You can power it by placing redstone dust next to it, running redstone wire to it, or placing a redstone component like a lever, button, or repeater adjacent to it.

A button gives a brief pulse, so the command runs once when you press it. A lever stays on or off, so an Impulse block powered by a lever runs once when you flip it on. A Repeat block powered by a lever runs continuously while the lever is on.

For testing, place a button next to your command block, type your command in the block's interface, and press the button to run it.

Writing and testing commands

Right-click a command block to open its interface. You will see a text field where you can type a command. The command must start with a forward slash. Common examples include /say hello (makes the server announce text), /summon creeper (spawns a creeper), and /give @s diamond (gives you a diamond).

Type your command, then click "Done". Power the block with redstone to test it. If the command has an error, the block will turn red and show an error message in the chat. If it works, the block will turn green briefly.

You can find a full list of commands in the official Minecraft wiki or by typing /help in the chat to see available commands on your server.

Command blocks in different Minecraft versions

Command blocks work the same way in Java Edition and Bedrock Edition, but the command syntax differs slightly between them. Java Edition uses /give @s command_block, while Bedrock uses the same command but may require you to enable "Command Blocks" in world settings before you can use them.

If you are playing on a server or realm, the server owner must enable command blocks in the server settings before anyone can use them. On a local world, you control this yourself.

Frequently Asked Questions

Can I get a command block without turning on cheats?

No. Command blocks are only available through Creative mode or the /give command, both of which require cheats to be enabled. There is no way to obtain one in pure Survival mode without cheats.

What happens if I break a command block?

It drops as an item that you can pick up and place again. You lose the command stored inside it, so write down any important commands before breaking the block. In Survival mode without cheats, you cannot pick it up — it disappears.

Can I copy a command block's command to another block?

In Java Edition, hold Ctrl and right-click a command block to copy its command, then right-click another command block and paste it. In Bedrock Edition, you must type the command manually into each block.

Why is my command block not running?

The most common reason is that it is not receiving a redstone signal. Make sure a lever, button, or redstone wire is powering it. Also check that your command has no typos — the block will turn red if the syntax is wrong.

Can I use command blocks in multiplayer?

Yes, but only if the world or server has cheats enabled and command blocks turned on in the settings. On a multiplayer server, only the server owner can enable these features.