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.


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 '16 at 0:01
  • @ReaLord Yes. For example: @a[score_SCORE1_min=1,score_SCORE2_min=3,score_SCORE3=0] – SirBenet Aug 31 '16 at 12:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.