How to Enable Command Blocks on a Minecraft Server

Enable command blocks on your Minecraft Java server using the correct property or game rule for your version. Includes a simple test and rollback.

Check your Minecraft Java version in Console. The command block setting differs by release.

Minecraft 1.21.11 and newer

Enter gamerule minecraft:command_blocks_work true in Console. Omit true to read the value, or use false to disable it. No restart is needed.

Minecraft 1.21.9 and 1.21.10

Enter gamerule commandBlocksEnabled true. Omit true to check it, or use false to disable it. No restart is needed.

Minecraft 1.21.8 and older

  1. Open server.properties and set enable-command-block=true. Add the property if it is missing.
  2. Save and restart the server. Set it to false and restart to disable it again.

The 1.21.9 release notes explain the move to a game rule. 1.21.11 renamed it. The old property does not enable command blocks on newer versions.

Test a command block

  1. Use a trusted operator account in Creative mode. If needed, enter op PlayerName and gamemode creative PlayerName in Console for your own Java username.
  2. Enter give PlayerName minecraft:command_block. Place it and use an impulse block that needs redstone.
  3. Set its command to say Command block test, then attach and press a button.
  4. Remove the block and restore your original game mode. If operator access was temporary, enter deop PlayerName.

If it does not run

Check the rule for your version, loaded area and redstone signal. Use a non-conditional block for this single test. Repeating blocks can run every tick, so test unfamiliar commands in an impulse block first.

Related: Edit server properties · Change version · Minecraft hosting.

Was this article helpful?

Your feedback helps us improve our guides.

Written by Konnect HostingUpdated Compare Minecraft server hosting plans →
NEED MORE HELP?

Talk with the Konnect community

Get support from staff and other server owners.

Join our Discord