Command blocks in Java Edition are enabled by setting enable-command-block=true in server.properties, while Bedrock Edition needs Activate Cheats turned on in world settings.
Command blocks are among Minecraft’s most powerful building tools—they run automated commands that drive custom maps, mini-games, and complex redstone contraptions. But they don’t work right out of the gate. You need to flip a specific switch first, and the method depends entirely on which edition you play. This guide covers the exact steps for Java Edition servers, Bedrock Edition worlds, and the permissions you need to actually use them.
Enabling Command Blocks in Java Edition: The Server.Properties Edit
Java Edition servers disable command blocks by default. The fix is a single line change inside the server’s configuration file, and it takes under a minute.
- Stop the server completely. Editing
server.properties while the server runs won't stick. - Open
server.propertiesin any text editor. This file lives in the server's root folder. - Find or add the line
enable-command-block=falseand change it toenable-command-block=true. Do not include spaces around the equals sign. - Save the file and restart the server.
That's it. Command blocks are now enabled for the entire server. Many hosting panels—Nodecraft, Hostinger, ScalaCube, and StickyPiston—also offer a toggle in their Game Settings or Gamemode Settings area that writes this same line for you. Whichever route you take, the result is identical.The Minecraft Wiki documents this same procedure, noting that the default value is false and that the setting applies server-wide.
Enabling Command Blocks in Bedrock Edition: The World Settings Route
Bedrock Edition takes a different path. Instead of a config file, you enable command blocks through each world's own settings, then give yourself one with a command.
- Open the world you want to use.
- Go to World Settings and turn Activate Cheats on. This is a simple on/off toggle.
- Open chat and type
/give @s command_blockor/give @p command_block. You'll receive a command block in your inventory.
Microsoft's official creator documentation confirms this workflow and recommends testing command blocks in a Flat world before building anything complex. Once the block is in your hotbar, place it on the ground and use the Use Item control (usually right-click or a tap) to open its interface.
How to Obtain and Place a Command Block
Having command blocks enabled doesn't put one in your inventory. You still need to summon it with a command and place it before you can program it.
- Java Edition: Use
/give @s minecraft:command_block. If the Operator Items Tab is enabled in your server settings, you can also grab one from the Creative inventory's Operator Utilities tab. - Bedrock Edition: Use
/give @s command_blockor/give @p command_blockfrom chat. The block appears in your inventory immediately.
Place the block anywhere in the world, then interact with it to open the GUI. From there you can set the Block Type (Impulse, Repeat, or Chain), the Redstone behavior (Needs Redstone or Always Active), and paste in the command you want it to run. A common beginner setup is a Repeat command block set to Always Active to run a clock-like effect every tick.
What Permissions Do You Need to Edit Command Blocks?
Enabling command blocks system-wide is only the first step. The player who wants to edit them also needs the right permissions.
- Java Edition servers: You must be an operator with an op-permission-level of 2 or higher. Without this level, the command block GUI won't open even if the block is enabled. Single-player worlds with cheats on bypass this requirement.
- Bedrock Edition: Cheats must be enabled for the world. The player also needs to be in Creative mode to open and edit the block interface. Survival mode players cannot interact with the command block GUI.
- Both editions: Creative mode is the standard environment for building with command blocks. While it's technically possible to edit one in Survival if you're an operator, the GUI may not behave as expected.
| Setup Area | Java Edition (Server) | Bedrock Edition (World) |
|---|---|---|
| Configuration method | server.properties file edit |
Activate Cheats toggle in World Settings |
| Config key | enable-command-block=true |
N/A (toggles in UI) |
| Default state | Disabled (false) |
Disabled |
| How to obtain a block | /give @s minecraft:command_block |
/give @s command_block |
| Permission to edit | Operator + op-permission-level ≥ 2 | Cheats enabled + Creative mode |
| Hosting panel shortcut | Nodecraft, Hostinger, ScalaCube, StickyPiston | N/A (world-level setting) |
| Version available since | Minecraft 1.4 | Minecraft 1.4 (equivalent Bedrock release) |
Common Command Block Issues and Fixes
Even after following the setup steps, a few things can silently prevent command blocks from working. Here are the most frequent problems and their solutions.
| Problem | Likely Cause | Fix |
|---|---|---|
| Command block GUI won't open | Player is not an operator (Java) or not in Creative mode (both) | Check operator status and op-permission-level; switch to Creative mode |
| Setting in server.properties won't save | Spaces around the equals sign | Write enable-command-block=true with no spaces |
| Command block runs but does nothing | maxcommandchainlength is set to 0 on Bedrock |
Set maxcommandchainlength to a positive value |
| Repeat command block never stops | Block type set to Repeat with Always Active | Switch to Impulse or add a redstone gate to control it |
| Command block is in inventory but can't be placed | Cheats or operator permissions not properly saved | Restart server (Java) or reload world (Bedrock) |
Command Block Setup Checklist
- Java or Bedrock.
- Java: edited
server.propertieswith no spaces around the=and restarted the server. Bedrock: turned on Activate Cheats for the world. - Given yourself a command block with
/give @s command_blockor the Java variant. - Placed the block and set its type (Impulse, Repeat, or Chain) and redstone behavior.
- Verified operator status and Creative mode.
- Tested with a simple command like
say Helloto confirm it fires.
References & Sources
- Minecraft Wiki. "Command Block." Official community reference covering all editions, configuration, and usage.
