> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.nexushosts.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Enable and Use Command Blocks on Your Minecraft Server

In Minecraft, a command block is a special block that executes commands automatically, without you having to type them in every time. It lets you trigger actions like summoning mobs, changing game settings, or even starting redstone-driven events. When you chain several of them together, you can design complex puzzles, mini-games, or entire automated systems that transform how the game works. They’re a fantastic tool for players who want to dive deeper into custom gameplay and automation.

### Step 1:

Log in to your [Nexus Hosting Account](https://gamecp.nexuscorehosting.com/auth/login).

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfPelc1ujdpp1lbesOjjJxrTaA_aPUQso-Mw-FtugOdODZ6nbGHr4irGyQYhdCijwDZDnKX4F5RSKwlDHbOTfAeTObp88fOrzBpxdU7tsKKtXUF5HOdbxw5XfCKEi2paNs52xri?key=_QqvqyPl5Tfkdu2uLrNncUjC)

### Step 2:

Once on the dashboard, find and select your intended Minecraft server. 

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdxF-neTr0latA_E3HoB_eURdZ_prN2P4sNwApUBdCICG3OgtMKm0J0pJIT4NQvhQFudcT0u1Sz-SjpvK5QiNfAMsV2VWr1i2_sW1V204bHFK0HpXSJBhhuvWl2x8zN2PTYK1CXkA?key=_QqvqyPl5Tfkdu2uLrNncUjC)

### Step 3:

Because we’re going to be making changes to the properties file for your server, you need to stop the server first to avoid any risk of file corruption. 

Navigate to the Terminal page and click the red **Stop** button in the upper right corner. 

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdEW9ltvcWI8yleZ1emtcpRUc5-AcABgj6cntl8nP9EoYre3cvlbny5i8eO_0c8K9MLng12lJZMsRHLAvCy7VYhWPsNPCJKpUnRSrzZnPPknZMs6AGGcYQLE11Ad2otZG4-7dAKWQ?key=_QqvqyPl5Tfkdu2uLrNncUjC)

### Step 4:

Wait until the console outputs ** “Server marked as offline…” **Then, select the ** Files **option from the sidebar. 

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXc3nt4M9jevpwoACwArO43EXCyD48Lk8NbmpnjpftpML5HTDZSrLk7_1GTJutDh7MlYbOL6hhO78jvf3eH47bag7G_eghDRY1aGUcLVIjr-eUJprjp_0JC65TY6CcBV4fkDuQU1WQ?key=_QqvqyPl5Tfkdu2uLrNncUjC) 

### Step 5:

Scroll down until you find the **server.properties** file, then click to open the file editing window. You can edit and save file changes right in your Nexus portal, so you won't need to use a text editor.

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcMdwjTbGJsyVOwqfzPGY5mSd3cXfqHTZvGplREwCD63qRaT1tiRBKIoaT43_7Nkvz2kK-9wPy6gmJwJkQwO-JIujFvgscfzo-ra8IDgZaL7nAhtEWXch4qKq6oKrcxXNAL3zFjWg?key=_QqvqyPl5Tfkdu2uLrNncUjC)

### Step 6:

Now find the **enable-command-block** setting (properties are sorted alphabetically, so it should be near the top).

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXc854kmNx78YoyNuPkflSdsvJorTV8hUbD8hfmBgEpg_LijGefy4f7s3OF6AvJLr8v-d4Ni6sub6NNTgkS-w9k48dh3Isv7YzNRhz6P7H4Bgg7NX9R8CjdyzBdQBOqMAys4WIM7fQ?key=_QqvqyPl5Tfkdu2uLrNncUjC)

Change its value from false to **true** and click **Save Content**.

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfnmTv07mdlNg3AjtrcFE0h_tvRp9BaEg4FQL1dK04Aj_Xk0zPhmYCJCOl8Kb6B0iiKBtJcj2iyiXHVkaWpAGcrqSUWcliS-CZyHL-jz30EnfAsSfhdxgx5_xjckVl8GoyKXUTeng?key=_QqvqyPl5Tfkdu2uLrNncUjC)

### Step 7:

You can now return to the Terminal page and click the green **Start** button to restart your server. 

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXe_Pd4lo66SxDcVXsZbh9VARy0tArE4UYZJWZBYR22DE2SVRFjwDvy2yqWRN7ERs7M2dc3Ng3t60j6ATRZY62Jc7FhZMJoTtCxrAZvmNfqHZU4IIifX3GBPAszFhA3yMp-djHUF?key=_QqvqyPl5Tfkdu2uLrNncUjC)

### Step 8:

To use command blocks, you must have server operator (OP) status. If you haven’t already made yourself an OP, you can check out our [step-by-step OP guide](https://help.nexushosting.io/en/article/how-to-make-a-player-an-op-in-minecraft-v9gj6a/) for help.

Log into your server. Press “**T**” to open the console and then type the following command:

**/give <your_username> minecraft:command_block**

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcw-PBVwiecOHJ_dURw-jlP88zSHebN0DMzGtF04Eu8NxVH0BwgAS6CPJXyVRP1uy2nb6wvYcU8JRBAwYlP7osBR8DLkh7lzvcuOZ36WjGZFA8FNLftj3USmiS5uvzMXqdfsRHO4g?key=_QqvqyPl5Tfkdu2uLrNncUjC)

### Step 9:

A command block will spawn in your inventory. You can place as many of them as you need. Right-click to place it and then right-click the block to open its interface. 

|| You have to be in Creative mode to set a command block. If needed, switch modes by typing /gamemode creative.

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXf-II0S3zvtt2srKO2_BSj5CwUgpJFTq2qOuiprtnINtJtLbP4QRqqtV9vt9h8DgcNeALLJ1z6voDO1hoeGVZVk4jBspd2_aCp8OubGy9J3JVmjkcDi_hHTwdJkt-Qg8gzvbDnd1g?key=_QqvqyPl5Tfkdu2uLrNncUjC)

### Step 10:

You’re now ready to create and execute commands with your command block. For a quick tutorial to get you started with commands, check out this video from OMGcraft (it's older but still very relevant):

${youtube}[Tip: How to Use Command Blocks in Minecraft](63X1vMd9oUk)
You can also reference this [Minecraft Wiki page](https://minecraft.fandom.com/wiki/Commands) for a comprehensive list of console commands and their functions.**