Updated:

Enable Command Blocks game rule (command_blocks_work)

The "Enable Command Blocks" rule is called command_blocks_work in Java 1.21.11 and later, and commandBlocksEnabled in 1.21.10 and earlier. Controls whether command blocks run. Set it to false to stop every command block.

Basic data

NameEnable Command Blocks
Rule name (Java 1.21.11+)command_blocks_work
Old name (Java 1.21.10 and earlier)commandBlocksEnabled
Bedrock namecommandblocksenabled
Value typetrue / false
Defaulttrue

Commands you can copy

Turn off (false)

/gamerule command_blocks_work false

Reset to the default (true)

/gamerule command_blocks_work true

Check the current value

/gamerule command_blocks_work

Java 1.21.10 and earlier

/gamerule commandBlocksEnabled false

Bedrock Edition

/gamerule commandblocksenabled false

Notes

Questions

Typing commandBlocksEnabled gives an error

In Java 1.21.11 and later the rule is called command_blocks_work. Write /gamerule command_blocks_work … instead. Worlds on 1.21.10 and earlier keep the old name.

How do I check the current value?

Run /gamerule command_blocks_work without a value. The current value is shown in chat.

Other game rules