Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →To enable command blocks, use the method that matches your Minecraft Java Edition server version. In Java 1.21.8 and earlier, set enable-command-block=true in server.properties and restart the server. Java 1.21.9 and newer use a gamerule instead: run the version-appropriate command from the server console. Java 1.21.9 and 1.21.10 use gamerule commandBlocksEnabled true; Java 1.21.11 and later, including current 26.x releases, use gamerule command_blocks_work true.
Playing with friends? Godlike.Host runs hosted Minecraft Java servers from 10 data-center locations, with free DDoS protection.
This guide covers Java Edition dedicated servers. Bedrock Edition uses different settings and is not covered here.
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
Minecraft | Java & Bedrock Deluxe Collection | Windows Digital Code | $39.99 | Buy on Amazon |
| 2 |
|
Minecraft | Java & Bedrock Ultimate Collection | Windows Digital Code | $49.99 | Buy on Amazon |
| 3 |
|
Minecraft | Standard Edition | XBOX Digital Code | $19.99 | Buy on Amazon |
| 4 |
|
Minecraft | $6.99 | Buy on Amazon |
| 5 |
|
Minecraft - Bedrock Edition PS4 | $42.98 | Buy on Amazon |
As an Amazon Associate I earn from qualifying purchases.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsQuick answer by version
| Java server version | How to enable command blocks | Restart required? |
|---|---|---|
| 1.21.8 and earlier | Edit server.properties and set enable-command-block=true. |
Yes. The property is read when the server starts. |
| 1.21.9–1.21.10 | Run gamerule commandBlocksEnabled true in the console or as an operator. |
No, when the command is accepted. |
| 1.21.11 and later | Run gamerule command_blocks_work true. |
No, when the command is accepted. |
| Java 26.x | Use gamerule command_blocks_work true, according to current third-party setup guides. |
No, when the command is accepted. |
The name changed during the 1.21.9–1.21.11 transition. If you are unsure which spelling your server accepts, try the command for your exact version and use the error message to identify a mismatch.
Before changing anything
Confirm that this is a Java Edition server
The commands and configuration key in this article are for a Minecraft Java Edition dedicated server. Do not apply them to a Bedrock server, a single-player world, or a hybrid setup without checking that platform’s documentation.
#1 Best Overall
- DELUXE COLLECTION — Includes Minecraft: Java & Bedrock Edition, three Bedrock add-ons, three exclusive Character Creator items, and 700 Minecoins.
- CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
- EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
- SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
- PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).
Find the exact server version
Use the version shown by the server startup log, the server jar name, or the version selected in your server panel. The distinction between 1.21.8, 1.21.9, 1.21.10 and 1.21.11 matters because the setting changed from a file property to a gamerule and then changed names again.
Make a backup
Stop the server before editing its files and keep a copy of server.properties. A backup gives you a way to restore the previous setting if a typo or an interrupted edit causes startup problems. Never edit a live file while the server is writing it.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Have operator permission
Command blocks require operator status. From the server console, grant it with:
op PlayerName
Replace PlayerName with the player’s exact name. The op-permission-level value in server.properties must be 2 or higher; its default is 4. Command blocks execute commands at operator level 2, so a lower setting can prevent them from working even when the enable setting is correct.
Rank #2
- ULTIMATE COLLECTION — Includes Minecraft: Java & Bedrock Edition, five Bedrock add-ons, five exclusive Character Creator items, and 1000 Minecoins.
- CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
- EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
- SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
- PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).
Java 1.21.8 and earlier: edit server.properties
Older Java servers use the enable-command-block property. It is false by default, and the server reads it at startup.
- Stop the server cleanly. Use the console’s stop command or your provider’s stop control. Do not simply close the terminal or kill the process.
- Open the server directory. Locate the folder containing the world folders, the server jar and
server.properties. A hosted control panel may provide a file manager; its labels vary by provider. - Open
server.propertiesas plain text. Do not open it in a word processor that can add formatting. - Find the setting. Look for a line beginning with
enable-command-block=. - Set the value to true. The completed line must be exactly:
enable-command-block=true
- Add the line if it is missing. Put it on its own line. Do not create a second copy of the same property.
- Save the file without changing its format. Keep the filename as
server.properties; do not add.txt. - Start the server again. This restart is required because the setting is read only during startup.
After the restart, log in with an operator account and obtain a block with /give @s command_block. If the command is rejected, resolve operator or permission-level issues before changing the property again.
Java 1.21.9 and 1.21.10: use commandBlocksEnabled
In these versions, the old enable-command-block property was replaced by a gamerule. Run the following in the server console:
gamerule commandBlocksEnabled true
When entering the command in the in-game chat as an operator, include the leading slash:
Rank #3
- CREATE YOUR WORLD — Build whatever you imagine in an infinite world that is unique in every playthrough.
- EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world full of surprises.
- SURVIVAL ADVENTURES — Face mysterious foes, travel across varied landscapes, and venture into perilous dimensions.
- PLAY TOGETHER — Play solo or join friends in local split-screen and cross-platform play across console, mobile, and PC. Online multiplayer supports up to 8 players.
- COMMUNITY PLAY — Connect with players on community servers, or subscribe to Realms Plus (sold separately) to play with up to 10 friends on a private server.
/gamerule commandBlocksEnabled true
A successful response changes the rule immediately, so a restart is not needed. If the console reports that the gamerule is unknown, verify that the server is actually 1.21.9 or 1.21.10 and that you did not type the later command_blocks_work name instead.
Because gamerules are stored with the world, apply the command while the intended world is loaded. If you operate several worlds, confirm that you are changing the world in which the command blocks will be used.
Java 1.21.11 and later: use command_blocks_work
The gamerule was renamed again in Java 1.21.11. Run:
gamerule command_blocks_work true
From in-game chat, use:
/gamerule command_blocks_work true
The change takes effect without a restart when the server accepts the command. Java 26.x setup guides use this same gamerule. The official Java 26.1 release notes and the 26.1.1 hotfix notes do not document a command-block setting change, so use the command above unless the exact server build reports a different rule.
Rank #4
- Skins! We have biome settlers, city folk, town folk, and more!
- The Nether and all its inhabitants. Fight Ghasts and make friends with Pigmen
- Cross platform play for up to five players between Pocket Edition and Windows 10
- Revamped touch controls, controller support, and a controller mapping screen
- Enhanced Weather effects! Accumulating snow and more
How to get a command block
Command blocks are not listed in the creative inventory. An operator can give one to themselves with:
/give @s command_block
To give one to a named player, replace the selector:
/give PlayerName command_block
The other block types use these item IDs:
| Block type | Item ID | Example |
|---|---|---|
| Impulse (regular) command block | command_block |
/give @s command_block |
| Chain command block | chain_command_block |
/give @s chain_command_block |
| Repeating command block | repeating_command_block |
/give @s repeating_command_block |
If /give fails, check that the player running it is opped and that the server’s op-permission-level is at least 2.
Console commands versus in-game commands
The server console generally expects the command without a leading slash. In-game chat expects the slash. This distinction matters when copying instructions:
Best Value
- Play and share with friends on console, mobile and Windows 10
- discover community creations in the new in-game store
- access new mini games and game modes through servers
| Task | Server console | In-game chat |
|---|---|---|
| Enable 1.21.9–1.21.10 | gamerule commandBlocksEnabled true |
/gamerule commandBlocksEnabled true |
| Enable 1.21.11+ | gamerule command_blocks_work true |
/gamerule command_blocks_work true |
| Grant operator status | op PlayerName |
/op PlayerName |
| Give a regular command block | give PlayerName command_block |
/give PlayerName command_block |
If a hosting panel has a console box, follow that panel’s syntax. Some panels automatically add a slash; others do not. The server’s response is the reliable indicator that the command was parsed.
Verify that command blocks are enabled
- Confirm the exact Java version in the startup log or server panel.
- Run the gamerule command that matches that version, or confirm the property line for a 1.21.8-and-earlier server.
- Use
/give @s command_blockas an operator. - Place the block and open its interface.
- Enter a harmless test command appropriate to your world, then activate the block using its configured activation method.
- Check the server console and the block’s output for an error message. A successful enable setting does not correct a malformed command, a missing target, or an insufficient permission level.
For older versions, if you edited the property while the server was running, stop and restart it; otherwise the server may continue using the old value.
Troubleshooting command blocks that do not work
The server says the gamerule does not exist
- Check the exact version. Use
commandBlocksEnabledonly on 1.21.9–1.21.10. - Use
command_blocks_workon 1.21.11 and later. - Make sure you are running a Java server, not Bedrock Edition.
- Type capitalization and underscores exactly as shown.
The old property appears to do nothing
- The property applies to Java 1.21.8 and earlier. Newer releases use a gamerule.
- Confirm the line is exactly
enable-command-block=true, with no quotation marks or extra spaces. - Restart the server after saving; the property is read at startup.
- Ensure you edited the active server directory rather than a backup or an unused installation.
/give or /gamerule reports no permission
- Run
op PlayerNamefrom the console. - Check that
op-permission-level=2,3or4is set inserver.properties. The default is 4. - If you changed the permission-level property, restart the server so the new value is loaded.
The block exists but does not execute the command
- Read the command block’s displayed error or output and correct the command itself.
- Confirm that the block is configured and receiving the activation required by its settings.
- Check selectors, target names and dimensions; a valid block setting cannot compensate for a command aimed at a nonexistent target.
- Review server logs for plugin, datapack or permission errors that occur at the same time.
The setting keeps reverting
- On older versions, shut the server down before editing so it cannot overwrite the file on exit.
- On gamerule-based versions, apply the rule in the world that is actually being played.
- Check whether a startup script, management panel or world-reset process restores a previous configuration.
Version-name confusion and what is established
The transition is easy to misread because the rule changed names more than once. The Minecraft Wiki version changelog records the sequence as follows: the rule first appeared in 1.21.9 as enableCommandBlocks, was renamed to commandBlocksEnabled, and was renamed again to command_blocks_work in 1.21.11. The same changelog identifies commandBlocksEnabled for Java 1.21.9 and 1.21.10.
Some setup references describe the old property as being replaced in 1.21.9, while other references emphasize the 1.21.11 rename. For practical administration, use the command that matches the exact server version rather than relying on a broad “1.21 or newer” instruction. If Mojang publishes a build-specific change after this guide’s October 14, 2026 information, the server’s accepted gamerule and release notes take precedence.
Security on a multiplayer server
Command blocks can run high-impact commands, including commands that alter player permissions, inventories, game modes or the execution context. Treat them as an administrative capability, not as a harmless building feature.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall- Grant operator status only to people who need it.
- Do not leave command blocks accessible in areas where untrusted players can place or edit them.
- Protect command-block areas with the server’s normal region or build-permission controls.
- Review command text before enabling a block copied from another server or downloaded project.
- Keep a recent world backup before introducing a large command-block system.
- On a public server, test changes in a private or staging world first.
These are general administration precautions. Exact protection features depend on the server software and plugins you use.
Frequently needed command reference
| Purpose | Command |
|---|---|
| Enable on Java 1.21.9–1.21.10 | /gamerule commandBlocksEnabled true |
| Enable on Java 1.21.11+ | /gamerule command_blocks_work true |
| Grant operator status | /op PlayerName |
| Give a regular command block | /give @s command_block |
| Give a chain command block | /give @s chain_command_block |
| Give a repeating command block | /give @s repeating_command_block |
For Java 1.21.8 and earlier, the enabling line remains enable-command-block=true in server.properties; it is not a chat command.
Quick Recap
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.




