Customize Block Commands
Commands to be run when player breaks the block
Run the command
/regen menu
.Select "Edit Menu."
Select "Region / Global."
Select "Block Menu."
Select the block you want to edit.
Click on "Add Commands" (Command Block icon).

Runner: Specify whether the command should be run by the console or the player.
Command: Specify the command to be executed.
Chance: Set a chance between 0.001 to 0.999 for the command to run.
For example:
Console ; say hi ; 0.5
Player ; spawn ; 0.1
Command Chaining
Example of Command Chaining
To use command chaining, format the command sequence as shown below:
Console ; teleport %player% 100 64 200 > Player ; give %player% diamond_sword ; 0.25
In this example, if the teleport command is successful, there is a 25% chance that the player will receive a diamond sword.
Supported Placeholders: %player% : Replaces with player name %x% : Replaces with block's x co-ordinate %y% : Replaces with block's y co-ordinate %z% : Replaces with block's z co-ordinate %world% : Replaces with block's world
Last updated
Was this helpful?