Guide Minecraft

How do I enable command blocks on my Minecraft server?

How to enable command blocks on your Minecraft server: with a game rule since 1.21.9 and in server.properties on older versions.

By Yvan Watchman Updated

How you enable command blocks depends on your Minecraft version. Since 1.21.9 it is no longer a setting in server.properties but a game rule, and it is on by default. On older versions you enable it in server.properties.

Good to know

Using command blocks requires OP rights and Creative mode. See How do I give a player OP on my Minecraft server?

Minecraft 1.21.9 and newer (including 26.x)

Command blocks are on by default. If they do not work, someone turned the game rule off. Type in the console of the game panel:

text
gamerule command_blocks_work true

No restart is needed. Use false instead of true to turn them off.

Running 1.21.9 or 1.21.10?

In those two versions the game rule had a different name. Type /gamerule in chat and pick the rule with command in it from the suggestions.

Minecraft 1.21.8 and older

  1. Open your server in the game panel and stop it with Stop.
  2. Go to Files and open server.properties.
  3. Find the line enable-command-block=false and change it to:
properties
enable-command-block=true
  1. Click Save Content and start your server with Start.

Get a command block

Command blocks are not in the Creative menu. Give yourself one with this command in chat:

text
/give @s command_block

Check

Place a command block, right-click it and enter a command, for example say Hello. Give the block a redstone signal. If the text appears in chat, it works.

Did this article help you?

Did not find what you were looking for?

Open a ticket and our team will look into it with you. For a quick question, Discord works too.

Open a ticket Go to Discord