I am creating a mini-game in Minecraft, where I must check to see if the player is injured. The injured player will then be given an item. My guess is that the command would look something like /testfor @p[injured=true], but this command doesn't work. Is there a command for this?


No there is no direct command in Minecraft for injured. However you can use a scoreboard to track if the player has taken damage. You can start by adding a scoreboard objective with the following command:

/scoreboard objectives add Health health

You are then able to detect (/testfor) if someone is not at 20 health using a command block or though the scoreboard. You can read more on Scoreboards on The Wiki.

| improve this answer | |
  • Thank you! This is exactly what I needed. Thanks for the help! – Andrew Dec 7 '13 at 1:59
  • 1
    @Tech No problem if you need any help with the command you know where to find me. – Aaron128l Dec 7 '13 at 2:01

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.