How to Enable Command Blocks on Your Minecraft Server

Learn how to enable command blocks for redstone automation, adventure maps, and custom mechanics on your Minecraft server.

Command blocks are special in-game blocks that can execute server commands automatically, either on their own or when triggered by redstone. They're essential for adventure maps, mini-games, custom mechanics, and server automation. By default, command blocks are disabled on servers for security reasons.

Enabling Command Blocks

Open the panel and stop your server

Access the XGamingServer panel and stop your Minecraft server.

Open Files

Go to Files.

Edit server.properties

Open server.properties and set enable-command-block= to true.

Save and start your server

Click Save and start your server.

Getting and Using Command Blocks

Command blocks don't appear in the Creative inventory — you need to give them to yourself using a command:

Open the Console

Go to Console on the XGamingServer panel (or use in-game chat with OP permissions).

Give yourself a command block

Type /give YourUsername command_block to receive a command block.

Place and configure the command block

Place it in-game and right-click to open the command interface.

Command Block Types

There are three types of command blocks, each with a different behavior:

TypeColorBehavior
ImpulseOrangeRuns the command once when activated
ChainGreenRuns when the command block behind it executes
RepeatPurpleRuns the command every game tick (20 times per second)

Cycle between types by clicking the block type button in the command block interface. Combine these with redstone for powerful automation systems.

Common Uses for Command Blocks

  • Adventure maps — Trigger events, teleport players, display messages, and control game flow
  • Mini-games — Set up lobbies, scoreboards, team assignments, and win conditions
  • Server automation — Automatic time-of-day resets, weather control, periodic announcements
  • Custom mechanics — Create shops, portals, boss fights, and custom enchantments
  • Spawn areas — Welcome messages, teleporters, and effect zones for new players

Security Considerations

Command blocks have full access to server commands, which means they can do anything an OP player can do — including giving items, teleporting players, changing game rules, and running dangerous commands. Keep these rules in mind:

  • Only grant OP to trusted players — Only players with OP permissions can place, edit, and activate command blocks
  • Protect command block areas — Use a land protection plugin to prevent non-OPs from breaking or accessing your command blocks
  • Audit uploaded worlds — If you're loading an uploaded world or adventure map, be aware it may contain command blocks with commands you didn't write

📝 Note: On Paper/Spigot servers, you can use permissions plugins to give players more granular control over who can interact with command blocks, rather than requiring full OP access.

If you get stuck at any time, you can join our Discord.

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