I was wondering if there was a way to test for players breaking a specific block, such as dirt. After they break the block, they die.

1 Answer 1


Set up an objective of the type you want, for example:

/scoreboard objectives add BreakDirt stat.mineBlock.minecraft.dirt

Then, on a clock and in this order, have the following commands:

/kill @a[score_BreakDirt_min=1]
/scoreboard players set @a[score_BreakDirt_min=1] BreakDirt 0

The first command kills anyone who has broken dirt, the second command sets their score back to 0 so they don't die repeatedly.

  • Am I able to put multiple objectives into one command?
    – ReaLord
    Aug 31, 2016 at 0:01
  • @ReaLord Yes. For example: @a[score_SCORE1_min=1,score_SCORE2_min=3,score_SCORE3=0]
    – SirBenet
    Aug 31, 2016 at 12:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .