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
Playing with friends? Godlike.Host runs hosted Minecraft Java servers from 10 data-center locations, with free DDoS protection.
On Java Edition 1.21.8 and older, set enable-command-block=true in server.properties and restart the server. Java 1.21.9 and newer uses a gamerule instead: Java 1.21.9–1.21.10 uses commandBlocksEnabled, while Java 1.21.11 and later uses command_blocks_work. You also need operator status and an operator-permission level of at least 2.
Command blocks let a server execute commands from a placed block instead of requiring a player to type each command. They are useful for teleport systems, minigames, automated messages, scoreboards, rewards and other server mechanics, but they can also run highly privileged commands. The steps below apply to Minecraft Java Edition servers; Bedrock Edition uses different settings and is not covered here.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
First, identify your Java Edition version
The setting changed during the 1.21 series. Using the old server.properties key on a newer server does nothing, while using the newer gamerule name on an older server produces an unknown-rule error. Check the version shown by your server console when it starts, or the version reported by the launcher and server file.
| Java Edition version | How command blocks are enabled | Restart required? |
|---|---|---|
| 1.21.8 and earlier | Set enable-command-block=true in server.properties. |
Yes. The property is read at startup. |
| 1.21.9 and 1.21.10 | Use the commandBlocksEnabled gamerule. |
No gamerule restart is required. |
| 1.21.11 and later, including Java 26.x according to current third-party guidance | Use the command_blocks_work gamerule. |
No gamerule restart is required. |
The version transition has been reported inconsistently. The Minecraft Wiki changelog records the rule being introduced as enableCommandBlocks in 1.21.9, then renamed to commandBlocksEnabled, and renamed again to command_blocks_work in 1.21.11. For an unusual build, snapshot, fork or modified server, query the gamerule and use the name your server accepts rather than assuming a name from a different release.
#1 Best Overall
Java 1.21.8 and earlier: edit server.properties
1. Stop the server before editing
Use the server’s normal stop command, then wait until the process has completely shut down. Editing while the server is writing its configuration can cause your change to be overwritten. Keep a backup of server.properties before making changes so you can restore the previous configuration if another setting is accidentally altered.
2. Open the correct configuration file
In the server’s main directory, open the file named server.properties with a plain-text editor. Do not open a similarly named client file or a file inside a world save. Find this line:
enable-command-block=false
Change only the value after the equals sign:
enable-command-block=true
The default is false. If the line is missing, add enable-command-block=true on its own line. Keep the spelling, hyphens and lowercase value exactly as shown; True, enabled or enable_command_block are not equivalent property values.
3. Save and restart
Save the file, close the editor and start the server again. This property is read during startup, so changing it while the server is running does not enable blocks immediately. A restart is also the simplest way to make sure the server has loaded the saved value rather than an older in-memory configuration.
4. Confirm that the setting loaded
Join the server as an operator and obtain a block with /give @s command_block. Place it and test it as described below. If the command gives an unknown item or the block cannot be used, recheck the server version and confirm that you edited the file belonging to the instance you actually started.
Java 1.21.9 and 1.21.10: use commandBlocksEnabled
In these releases, the old enable-command-block property was replaced by a gamerule. Adding or changing the old property is not the supported way to turn the feature on.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Run the gamerule from the server console
- Open the live server console while the server is running.
- Enter
gamerule commandBlocksEnabled true. Server consoles generally use the command without the leading slash. - Watch for a success response. If the console reports that the rule is unknown, verify that the server is really 1.21.9 or 1.21.10 and that you are connected to the correct console.
An operator can run the equivalent in chat with /gamerule commandBlocksEnabled true. The gamerule takes effect without restarting the server. To inspect its current value, run gamerule commandBlocksEnabled in the console or /gamerule commandBlocksEnabled in game.
Java 1.21.11 and later: use command_blocks_work
For 1.21.11 and later, the current rule name recorded in the Minecraft Wiki changelog is command_blocks_work. Current third-party guidance also applies this method to Java 26.x. Run:
Rank #3
- The classic UNO card game builds fun on game night with a Minecraft theme.
- UNO Minecraft features a deck and storage tin decorated with graphics from the popular video game.
- Players match colors and numbers to the card on top of the discard pile as in the classic game.
- The Creeper card unique to this deck forces other players to draw 3 cards.
- Makes a great gift for kid, teen, adult and family game nights with 2 to 10 players ages 7 years and older, especially Minecraft and video game fans.
gamerule command_blocks_work true
In game, an operator uses /gamerule command_blocks_work true. The change is live and does not require a restart. Query the rule with gamerule command_blocks_work or /gamerule command_blocks_work to confirm that it is true.
One third-party guide reports that this rule defaults to true. Explicitly setting it to true is still worthwhile because it makes the server’s intended state visible and fixes worlds or configurations where the value has been changed. If the command is rejected as unknown, do not repeatedly edit server.properties; first check whether the server is 1.21.9–1.21.10, where the accepted name is commandBlocksEnabled.
Free tools Windows power users keep installed
One-click scans. No signup required.
Resolve the 1.21.9–1.21.11 naming boundary
Reports disagree about exactly which point in the 1.21 series introduced each name. The practical mapping supported by the Minecraft Wiki changelog is:
- 1.21.9: the gamerule was introduced during the rename sequence.
- 1.21.9 and 1.21.10: use
commandBlocksEnabled. - 1.21.11 and newer: use
command_blocks_work.
If you administer a server build that does not fit those versions, test the rule directly. A successful query or set command is more reliable than copying a property from an older tutorial. Mojang’s Java 26.1 release notes discuss other changes and do not mention command blocks or server.properties; that omission does not indicate that command blocks were removed.
Rank #4
- Now Minecraft lovers can play a special version of UNO!
- Same as Basic UNO but features Minecraft characters and includes special Creeper rule card. Draw this card and the other players have to draw three more cards from the pile!
- The goal is to get rid of all the cards in your hand.
- First player or team to 500 wins.
- When you're down to one card, don't forget to yell "UNO"!
Give yourself operator status
Enabling the feature does not automatically let every player place or activate command blocks. Run this from the server console:
op PlayerName
Replace PlayerName with the player’s exact in-game name. An operator can also be granted status by an appropriately authorized operator in game with /op PlayerName. To remove it later, use deop PlayerName from the console or /deop PlayerName in game.
Check the operator permission level
The op-permission-level setting in server.properties must be 2 or higher. Its default is 4. Command blocks execute commands at operator permission level 2, so a server configured below level 2 can prevent command-block commands from working even though the block feature itself is enabled.
On an older Java server, stop the server, open server.properties, and check for a line such as:
Best Value
op-permission-level=4
If it is set to 1 or 0, change it to at least 2, save the file and restart. This is a separate setting from the command-block switch: the first permits command blocks to function, while the second determines the effective operator level used for commands.
Get a command block
Command blocks do not appear in the creative inventory. An operator can give one to themselves with:
Recommended Free Tools
/give @s command_block
For the other two block types, use:
/give @s chain_command_blockfor a chain command block./give @s repeating_command_blockfor a repeating command block.
From the server console, remove the leading slash if the console expects bare commands: give PlayerName command_block. Replace PlayerName with the intended recipient if you are giving the item to another player.
Test that command blocks actually execute
- Place the command block in a safe test area.
- Right-click it to open its interface.
- Enter a harmless command such as
say Command block testin the command field. - Choose the desired activation options, then select Done.
- Activate an impulse block with a button, lever or redstone signal. A repeating or chain block requires the corresponding redstone and chain conditions.
- Look for the message in chat and check the command block’s output for an error.
If the test message appears, the enablement, operator permission and block item are all functioning. Replace the test command only after that basic test succeeds. Keep experimental blocks away from players until you have verified every command and target selector.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Command blocks enabled but not working: troubleshooting
| Symptom | Likely cause | What to do |
|---|---|---|
| The old property appears to do nothing. | The server is 1.21.9 or newer. | Use the gamerule for the exact release: commandBlocksEnabled on 1.21.9–1.21.10 or command_blocks_work on 1.21.11 and later. |
| The gamerule is reported as unknown. | The rule name does not match the server version, or the command was sent to a different instance. | Check the startup version and query the alternative name. Do not infer the version from a launcher profile alone. |
| The gamerule change is not retained after a restart. | You changed a different world or server instance, or a startup process restored an older configuration. | Run the query again after restart and confirm the console working directory and server file being launched. |
| You cannot obtain or place the block. | You are not an operator, or you are using a restricted game mode or permission system. | Run op PlayerName from the console, then use /give @s command_block. Verify that the item ID is spelled correctly. |
| The block is placed but does not execute. | The feature is disabled, the block has no redstone activation, or the command has an error. | Query the gamerule or recheck server.properties, trigger an impulse block with a button, and inspect the block output. |
| Some commands fail while simple commands work. | The command is invalid, targets the wrong entity, or requires permissions beyond the block’s effective level. | Test the command in chat as an operator first, then copy the validated syntax into the block. Remember that command blocks execute at OP level 2. |
| A tutorial tells you to restart after a gamerule change. | It may be describing the older property method. | Gamerule changes apply immediately; only the pre-1.21.9 server.properties method requires a restart. |
Important differences between the two methods
- Configuration property: applies to Java 1.21.8 and earlier, is stored in
server.properties, and is read at startup. - Gamerule: applies to the newer releases, is stored with the world’s game rules, and can be changed while the server is running.
- Version sensitivity: the accepted gamerule name changed during the 1.21 series, so the release number matters more than the age of the tutorial you are following.
- Permissions: neither method grants operator status. You must separately use
/opor the console equivalent, and the server’s operator-permission level must be at least 2.
Security practices for public servers
Command blocks can execute powerful commands, including commands that change game modes, grant items, alter permissions or run commands through selectors and /execute. Treat a command block like a privileged automation tool rather than an ordinary decorative block.
Quick Recap
- Give operator status only to people who need it.
- Do not let untrusted players place, edit or trigger command blocks.
- Build command systems in a protected area and keep test blocks inaccessible to normal players.
- Review every command before activating a repeating block, especially commands that affect all players or use broad selectors.
- Use the server’s region-protection or permission controls when you need to restrict who can interact with the blocks.
- Keep a backup before changing permissions or deploying a large command system so you can recover from an accidental command.
Quick command reference
| Purpose | Console form | In-game operator form |
|---|---|---|
| Enable on Java 1.21.9–1.21.10 | gamerule commandBlocksEnabled true |
/gamerule commandBlocksEnabled true |
| Enable on Java 1.21.11 and later | gamerule command_blocks_work true |
/gamerule command_blocks_work true |
| Grant operator status | op PlayerName |
/op PlayerName |
| Give a command block | give PlayerName command_block |
/give @s command_block |
| Give a chain block | give PlayerName chain_command_block |
/give @s chain_command_block |
| Give a repeating block | give PlayerName repeating_command_block |
/give @s repeating_command_block |
Recommended decision path
- Confirm that the server is Java Edition.
- Check the exact version.
- For 1.21.8 or earlier, set
enable-command-block=trueand restart. - For 1.21.9 or 1.21.10, run
gamerule commandBlocksEnabled true. - For 1.21.11 or later, run
gamerule command_blocks_work true. - Grant yourself operator status and ensure
op-permission-levelis at least 2. - Give yourself
command_block, place it, and run a harmless test command. - If it fails, query the rule again and compare the error with the troubleshooting table before changing other settings.
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.

