Command blocks are only available in Creative mode or on servers where the owner has enabled them
A command block is a special Minecraft block that runs commands when activated. It looks like a dark purple or dark red cube depending on the type. Command blocks do not exist in Survival mode by default — you need either Creative mode access or a server where the owner has turned on command blocks in the world settings.
The reason for this restriction is that command blocks can change the game world in ways that would break Survival mode progression. They can spawn items, teleport players, change the weather, or modify terrain when ready. On a multiplayer server, only the owner or someone with operator permissions can place or use them.
If you are playing on your own single-player world, switching to Creative mode is the simplest path. If you are on a server or playing with others, you will need to ask the server owner or administrator to enable command blocks and give you permission to use them.
Key Takeaways
- Command blocks only work in Creative mode or on servers where the owner has enabled them in world settings.
- You obtain a command block by typing a command in Creative mode or by asking a server administrator to place one for you.
- Each command block type — Impulse, Chain, and Repeat — runs commands in different ways and at different times.
- Command blocks require a redstone signal (like a button or lever) or a specific setting to set up, depending on the type.
- Testing your commands in the chat bar first prevents mistakes that could crash the server or corrupt the world.
Getting a command block in Creative mode
Open the Creative mode inventory by pressing E on Java Edition or opening your inventory on Bedrock Edition. Search for "command" in the search bar — the command block will appear in the results. Click it to add it to your hotbar, then place it in the world like any other block.
On Java Edition, you can also type the command directly into the chat bar. Press T to open chat, then type /give @s command_block and press Enter. This puts a command block into your inventory when ready. The @s means "the player running this command" — you can replace it with a player name if you want to give a command block to someone else.
Bedrock Edition (Windows 10, Xbox, mobile) uses a slightly different command: /give @s command_block 1. The 1 at the end specifies how many blocks you want. You can change this number to get multiple command blocks at once.
Requesting command blocks on a multiplayer server
If you are playing on a server run by someone else, command blocks are disabled by default for security reasons. A server owner can enable them by editing the server properties file and setting enable-command-block=true, then restarting the server.
Message the server owner or an administrator and explain what you want to build. They may enable command blocks for the whole server, or they may place command blocks for you in a specific area and give you permission to use them. Some servers keep command blocks disabled to prevent players from breaking the game world or griefing.
If the server owner agrees to enable them, they will need to restart the server for the change to take effect. After that, you can obtain command blocks the same way you would in Creative mode — either by searching the inventory or by typing the give command.
Understanding the three types of command blocks
Minecraft has three command block types, each with different behavior. The Impulse command block (orange) runs its command once when it receives a redstone signal — like when you press a button next to it. The Chain command block (green) runs when the command block pointing to it finishes, creating a sequence of commands that execute in order. The Repeat command block (blue) runs its command every game tick (20 times per second) as long as it has power.
Right-click a command block to open its interface. You will see a text field where you type the command, a dropdown menu to change the type, and a checkbox labeled "Conditional." The Conditional setting makes the command block only run if the previous command block succeeded, which is useful for chains.
For most straightforward tasks — like giving yourself items or teleporting — an Impulse block with a button is easiest. For automated systems like mob farms or weather control, Repeat blocks work better because they run continuously. Chain blocks are for complex sequences where one command depends on another.
Writing and testing commands
Before you put a command into a command block, test it in the chat bar first. Press T to open chat and type your command. If it works, you can copy it into the command block. If it has an error, the chat will tell you what went wrong, and you can fix it before it runs on a loop.
Common commands include /give @s diamond 64 (gives you 64 diamonds), /teleport @s 100 64 200 (teleports you to coordinates 100, 64, 200), and /weather clear (clears rain and storms). The @s selector means "the player running this command." Other selectors like @a (all players) or @e (all entities) let you target different things.
If you are building a system with multiple command blocks, test each one individually before connecting them with redstone. A mistake in one command block can cause lag or unexpected behavior, especially if it is a Repeat block that runs 20 times per second.
Powering command blocks with redstone
An Impulse command block needs a redstone signal to run. Place a button, lever, or pressure plate next to it, and the block will execute when you set up the button or step on the plate. A lever stays on continuously, so the command block will run once when you flip it on and once when you flip it off.
A Repeat command block needs constant power. Place a redstone block next to it, or run redstone wire from a lever set to on. As long as the power is there, the command runs every tick. Turn off the power and it stops.
Chain command blocks do not need their own power source — they run when the command block pointing to them finishes. You can chain multiple command blocks together by pointing them at each other, creating a sequence that runs in order. This is useful for complex builds like custom mob spawners or automated farms.
Common mistakes and how to avoid them
The most common mistake is forgetting that Repeat command blocks run 20 times per second. If you put a command that spawns mobs or generates blocks into a Repeat block without a way to stop it, your server will lag or crash. Always test Repeat commands at low tick rates first, or use a Conditional setting to limit how often they run.
Another mistake is using the wrong coordinate system. Minecraft has three axes: X (east-west), Y (up-down), and Z (north-south). If you teleport to the wrong coordinates, you might end up in the void or inside a mountain. Write down the coordinates you want before you type the command.
On multiplayer servers, command blocks can be used to grief or break the world if someone has access to them. Only give command block permissions to players you trust. If you are the server owner, keep command blocks disabled unless you have a specific reason to enable them.
Frequently Asked Questions
Can I use command blocks in Survival mode?
No. Command blocks only work in Creative mode or on servers where the owner has enabled them. They are disabled in Survival mode to prevent players from bypassing the game's progression system. If you want to use command blocks, you must switch to Creative mode or ask a server administrator to enable them.
What happens if I put a command block in a Repeat loop without stopping it?
The command will run 20 times per second until you break the command block or turn off the redstone power. If the command spawns items or entities, your world will fill up quickly and your game will lag. Always test Repeat commands in Creative mode first and have a way to turn them off.
Can I use command blocks on a realm or server I do not own?
Only if the owner has enabled them and given you permission. Most server owners keep command blocks disabled for security. Ask the owner or an administrator if they will enable them for you. They may say no, or they may place command blocks in a specific area just for you to use.
Do command blocks work the same way on Java and Bedrock Edition?
The basic idea is the same, but the commands are slightly different. Java Edition uses commands like /give @s command_block, while Bedrock uses /give @s command_block 1. Some advanced commands only work on one version. Check the Minecraft wiki for your version if a command does not work.
What is the difference between a command block and a structure block?
A command block runs commands you type into it. A structure block saves and loads sections of the world, which is useful for copying buildings or creating templates. They serve different purposes — use a command block to automate actions, and a structure block to copy and paste terrain.