How to Enable Command Blocks on Your Minecraft Server

Enable command blocks on your Minecraft Java server, get them in survival, and use them safely with OP-only restrictions.

Command blocks are special blocks that execute commands when powered by redstone. They're disabled by default on multiplayer servers because any player who can place one can run almost any command. Enable them deliberately, and only on servers where all OPs are trusted.

Enable Command Blocks

Stop the server

In the XGamingServer Panel, open Console and stop your server.

Edit server.properties

Click Files in the sidebar and open server.properties. Find:

enable-command-block=true

Click Save Content.

Start the server

Start from Console. Command blocks are now functional.

Get a Command Block

Command blocks cannot be obtained in survival — even creative mode requires the give command. Run in chat or console:

/give @p command_block

You must be OP level 2 or higher to run this command. See OP Permissions.

Command Block Types

Right-click a placed command block to switch its mode:

TypeColorWhen it runs
ImpulseOrangeOnce per redstone pulse
ChainGreenWhen the command block behind it runs (chain reaction)
RepeatPurpleEvery tick (20×/second) while powered

Each can be set to Conditional (only runs if previous block succeeded) or Unconditional, and Needs Redstone or Always Active.

Permissions

ActionRequired OP level
Place / break command blocks2+
Edit command in command block GUI2+
Trigger an existing command blockAnyone (via redstone)

Set the default OP level in server.properties with op-permission-level=2.

Security Warning

Command blocks can run nearly any command, including /op, /give, /gamemode, and /execute. A malicious player with build access can use them to grant themselves OP, give items, or wipe the world. Only enable on servers where:

  • All players with build access are trusted, or
  • You use a region protection plugin (WorldGuard, GriefPrevention) to block command-block placement outside admin areas

Common Issues

ProblemFix
/give @p command_block says "unknown command"You're not OP, or your OP level is below 2. Run /op <yourname> from console
Command block placed but does nothingNot powered by redstone, or set to "Needs Redstone" without input — switch to "Always Active"
"Cannot place command block"enable-command-block=false is still set, or the server wasn't restarted
Chain command blocks not firingChain blocks must point away from the impulse block, and the impulse must succeed
Repeating command blocks lagging the serverReduce tick rate by gating with redstone, or use /execute if conditions to skip work

How is this guide?

40% Off — Limited TimeGet your Minecraft server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page