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=trueClick 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_blockYou 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:
| Type | Color | When it runs |
|---|---|---|
| Impulse | Orange | Once per redstone pulse |
| Chain | Green | When the command block behind it runs (chain reaction) |
| Repeat | Purple | Every 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
| Action | Required OP level |
|---|---|
| Place / break command blocks | 2+ |
| Edit command in command block GUI | 2+ |
| Trigger an existing command block | Anyone (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
| Problem | Fix |
|---|---|
/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 nothing | Not 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 firing | Chain blocks must point away from the impulse block, and the impulse must succeed |
| Repeating command blocks lagging the server | Reduce tick rate by gating with redstone, or use /execute if conditions to skip work |
Related Guides
How is this guide?

How to Change Your Minecraft Server MOTD
Customize the Message of the Day shown in the Minecraft multiplayer server list with colors, formatting, and a second line.
Minecraft Server Troubleshooting Guide: Common Problems and Fixes
Index of the most common Minecraft Java server issues — won't start, can't connect, lag, crashes, mod errors — with links to detailed fix guides.