Command Block Library

Command Block

Choose what you want to happen, then follow every Command Block setting. Java and Bedrock have separate screens you can compare directly with the game.

Before you start

Prepare the world for Command Blocks

  1. Enable cheats and enter Creative mode
  2. /give @s minecraft:command_block 1
  3. On a server, you need Operator permission and Command Blocks enabled

33 USE CASES

Choose a ready-to-use example

Copy the command, then match the block type, condition, and Redstone settings shown on the example screen.

Getting started

Beginner

Test your first Command Block

Press a button and make the Command Block announce a chat message. A quick check that settings and permissions work.

1 block Java Bedrock
Open setup

Player

Beginner

Teleport button to a rally point

Let the player nearest the Command Block press a button and teleport to coordinates 0 70 0.

1 block Java Bedrock
Open setup

Messages

Beginner

Welcome title on screen

Press a button to show a large welcome message to the nearest player, suitable for a map entrance or stage start.

1 block Java Bedrock
Open setup

World

Intermediate

Set daytime and clear weather

Use two connected Command Blocks. One press changes the time to day and clears the weather.

2 blocks Java Bedrock
Open setup

Rewards

Intermediate

Diamond and speed reward button

Press a button to give the nearest player one diamond, then apply Speed from a Chain Block.

2 blocks Java Bedrock
Open setup

Automation

Advanced

Automatic speed pad

Use a Repeat Command Block to check every player and apply Speed while they stand on a gold block.

1 block Java Bedrock
Open setup

Automation

Intermediate

Freeze a mob in place

Use a Repeat Command Block to keep applying high-level Slowness to zombies within 8 blocks, making the example mob stop walking.

1 block Java Bedrock
Open setup

Player

Beginner

Emergency healing button

Press a button to heal the player nearest the Command Block with Instant Health II, useful at rest stops or before a boss room.

1 block Java Bedrock
Open setup

Player

Beginner

Clear all effects station

Press a button to remove every status effect from the nearest player, useful at a stage exit or testing area.

1 block Java Bedrock
Open setup

Player

Beginner

Adventure mode entrance

Use a pressure plate to switch the entering player to Adventure mode and protect blocks in your map.

1 block Java Bedrock
Open setup

Player

Beginner

Respawn checkpoint

Let a player step on a checkpoint to set their personal respawn point above the Command Block for adventures or parkour.

1 block Java Bedrock
Open setup

Rewards

Intermediate

Starter kit button

Press once to receive a stone sword, 16 bread, and 32 torches from three connected Command Blocks.

3 blocks Java Bedrock
Open setup

Player

Intermediate

Clear player inventory button

Press a button to remove every item from the nearest player inventory, useful at a minigame reset point.

1 block Java Bedrock
Open setup

World

Beginner

Switch the world to Peaceful

Press a button to change the whole world to Peaceful, useful for build mode or a map control room.

1 block Java Bedrock
Open setup

World

Beginner

Thunderstorm button

Press a button to start a 60-second thunderstorm for a dramatic stage opening or special event.

1 block Java Bedrock
Open setup

World

Intermediate

Set the world spawn at a lobby

Use an operator button to set the world spawn to coordinates 0 70 0 for a lobby or map starting point.

1 block Java Bedrock
Open setup

World

Advanced

Clear an arena area

Press a button to replace blocks from 10 65 10 through 20 75 20 with air, resetting an arena or testing room.

1 block Java Bedrock
Open setup

World

Advanced

Restore an arena from a template

Copy an arena template from 0 64 0 through 10 74 10 to 20 64 20 to reset the scene before another round.

1 block Java Bedrock
Open setup

Automation

Intermediate

Clear nearby dropped items

Press a button to remove dropped items within 30 blocks of the Command Block, reducing leftovers in an arena or farm.

1 block Java Bedrock
Open setup

Messages

Intermediate

Minigame start countdown

Use four Command Blocks and Redstone Repeaters to announce 3, 2, 1, and Go! in chat before a minigame starts.

4 blocks Java Bedrock
Open setup

Automation

Advanced

Reset all players to the lobby

Press once to teleport every player to 0 70 0, switch them to Adventure mode, and clear all effects.

3 blocks Java Bedrock
Open setup

World

Beginner

Protect builds from mob griefing

Press a button to turn off mobGriefing, stopping mobs such as Creepers and Endermen from changing or destroying blocks.

1 block Java Bedrock
Open setup

Player

Beginner

Summon and mount a horse button

Bedrock-only use case: press a button to summon a horse for the player near the Command Block and mount it immediately with one command.

1 block Bedrock
Open setup

Player

Beginner

Emergency dismount button

Bedrock-only use case: press a button to make the player near the Command Block leave their current vehicle immediately.

1 block Bedrock
Open setup

Automation

Beginner

Damage pressure-plate trap

Bedrock-only use case: stepping on a pressure plate deals 4 damage to the player nearest the trap.

1 block Bedrock
Open setup

Rewards

Beginner

Five-level XP reward button

Bedrock-only use case: press a button to give 5 experience levels to the nearest player.

1 block Bedrock
Open setup

Rewards

Intermediate

Unbreaking III enchantment station

Bedrock-only use case: press a button to apply Unbreaking III to the item held by the nearest player.

1 block Bedrock
Open setup

Automation

Intermediate

Random arena spawn button

Bedrock-only use case: press a button to scatter every player randomly around center 0 0 before a minigame starts.

1 block Bedrock
Open setup

World

Beginner

Enable Keep Inventory button

Bedrock-only use case: press once so players keep their items and experience after death.

1 block Bedrock
Open setup

World

Intermediate

Lock the world to daytime

Bedrock-only use case: press once to set daytime, then stop the day-night cycle with a Chain Block.

2 blocks Bedrock
Open setup

World

Beginner

Disable natural mob spawning

Bedrock-only use case: press once to stop natural mob spawning, useful for a lobby or build world.

1 block Bedrock
Open setup

Messages

Intermediate

Automatic safe-zone message

Bedrock-only use case: show an action-bar message to every player who enters a 6-block radius around a Repeat Command Block.

1 block Bedrock
Open setup

Automation

Intermediate

Purge monsters around the base

Bedrock-only use case: press a button to remove entities in family=monster within 30 blocks of the Command Block.

1 block Bedrock
Open setup