Updated:

Command blocks are easier to learn when you start from small commands that give visible results. This page lists useful commands for beginners and links each one to a generator or detailed guide.

First commands to try

Repeating vs impulse vs chain

TypeColorRunsUse it for
ImpulseOrangeOnce each time it gets a redstone signalButtons, warps, giving a kit
RepeatingPurpleEvery game tick (20 times a second) while poweredConstant checks, such as "is anyone standing here?"
ChainGreenRight after the block pointing into it runsRunning several commands in order

Keep your first tests small to avoid lag or unexpected world changes.

Beginner mistakes

Example: move a summon to a player’s position

/execute at @p run summon minecraft:pig ~ ~1 ~

When a command runs directly in a command block, ~ ~ ~ refers to that block. The Java example above changes the execution position to the nearest player first, then summons a pig one block higher. It is an easy way to observe the difference between the executor and the execution position.

Test an impulse block before repeating

Place an impulse command block with a button, run one command and verify the result. A repeating block can create many entities rapidly, lag the world or repeatedly grant effects. Switch to repeating mode only after you have confirmed the command and added the necessary conditions or cooldown.

Debugging a chain

Conditional chain blocks depend on the success of the previous block. If a later command does not run, inspect the previous step and its target selector. Also check arrow direction, redstone mode and whether the server permits command blocks.

The settings in the command block window

Stop the chat spam

VersionCommand
Java 1.21.11 and later/gamerule minecraft:command_block_output false
Java 1.21.10 and earlier, Bedrock/gamerule commandBlockOutput false

By default every command block run is announced to operators in chat. A repeating block can fill the chat in seconds, so most map makers turn this off first.

Getting command blocks to work at all

Related tools