This article will show you how to enable and use command blocks on your Minecraft server.
For this tutorial, you need to be an OP. If you don’t know how to add yourself as an OP, please follow our guide: How to: OP Yourself on Your Minecraft Server.
Also, please note that to be able to use command blocks you need to be in creative, which can be done by using the following command:
❓ What Are Command Blocks ❓
Command blocks are actual in-game blocks that can execute commands. So you can let a block run a command instead of yourself.
Note that command blocks can not be obtained through survival, but only in creative.
🌲 Enabling Command Blocks In Your Server 🌲
Command Blocks are disabled by default. You can enable them in your server settings:
Log in to your Multicraft panel here and stop your server.
Click on Files, then go to Config Files.
Click on Server Settings.
Find Enable Command Blocks and set it to Enabled.
Click on Save and start your server.
Make sure to click "Save" before leaving these settings.
You just enabled command blocks on your server.
🤔 Getting a Command Block 🤔
There is no way to craft a command block, so you need to use the “give” command from Minecraft. You can enter the command /give <player_name> minecraft:command_block to give someone a command block. Replace <player_name>` with the username of the player.
You can also execute this command through your server console. Just remember that you don’t want to use the slash / in your Multicraft server console.
In this example, we used @p in Minecraft to give ourselves a command block.
Example: /give @p minecraft:command_block
🔎 Using Target Selectors With Command Blocks 🔎
A target selector is a syntax used to target a player or entity in Minecraft.
- @p - Targets the nearest player.
- @r - Targets a random player.
- @a - Targets all players.
- @e - Targets all entities.
- @s - Target yourself.
To be able to use command blocks on your server together with target selectors, lick @p you need to first run Bukkit/ Spigot/ PaperSpigot and then install the plugin called Commandhook which can be found here.
Note that, as it is told on the official page of the plugin, this plugin adds the possibility to use vanilla selectors in non-vanilla commands written in CommandBlock.
This plugin will allow you to use target selectors with command blocks on your server.
Here is our guide for installing plugins into your server.
To install this plugin into your server you need to do the following:
Download the plugin from its official page here.
Use Filezilla to upload the plugin to your server plugins folder.
Here is our guide for using Filezilla.
Restart your server.
You just set up the Commandhook plugins into your server.
If you find any issues enabling or using command blocks on your server please contact us on live chat or via the ticket system.
- Vanilla Commands
- How To: Add an Icon to a Minecraft Server
- How to Use the Minecraft Whitelist
Published on: 05 / 29 / 2019