Damage a Player or Mob
Deal a set amount of damage with a command
✅ Verified for Java 26.2 · Bedrock 26.32 — checked June 2026Deals a precise amount of damage to the targeted entity, optionally with a damage type. This example deals 6 damage (three hearts) as magic damage to yourself. The damage type controls armor and effect interactions; on Java it is a namespaced ID (minecraft:magic, minecraft:fall, etc.) and on Bedrock a short cause name. Great for scripted traps and testing.
/damage @s 6 minecraft:magic28 characters
- Java: yes
- Bedrock: yes
- Command block: yes
- Needs cheats / OP: yes
How to use
- Open chat (T on Java, / on Bedrock).
- Paste the command, choosing the target and amount.
- Optionally set a damage type at the end.
- Press Enter — the target takes the damage immediately.
Related commands
Make chat text a clickable button that runs a command
/tellraw @a {text:"[Click to teleport to spawn]",color:green,click_event:{action:run_command,command:"/spawn"}}Mount the closest horse with a command
/ride @s mount @e[type=horse,limit=1,sort=nearest]Become nearly invincible
/effect give @p resistance 999999 255 true