Command blocks are mechanical blocks that when powered by redstone will run a command of your choice. To access the command blocks you must be an operator on the server and in creative mode. It cannot be found in your creative inventory. Due to its ability to affect all aspects of the game, command blocks are not accessible in survival mode.
Impulse: Runs commands with a redstone signal. That means once powered they will run the command once and then stop.
Repeat: Runs the commands every game tick they are powered by default. Multiple commands can be run in a single tick. You can also set the delay between each tick or list of commands being executed.
Chain: Can only be executed once the previous blocks have gone through their set of commands.
Learn More (Wiki)
To enable command blocks for your Minecraft Java server, open the server.properties file and look for
enable-command-block. This option is usually disabled by default after the server has been generated. Simply change it from
true, then restart your Minecraft Java server.
In-Game, use the following command to obtain a command for yourself:
/give @p command_block
If you would like to give someone else a command block, which must be a operater, you can use:
/give <username> command_block
If you want to give someone a command block from the console, in the Game Panel, then use:
give <username> command_block
/ when using the console in the Game Panel