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:magic- 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
Clickable Chat Text That Runs a Command
Make chat text a clickable button that runs a command
Ride the Nearest Horse
Mount the closest horse with a command
Roll A Random Number 1–100
Generate a random number between 1 and 100
God Mode (Resistance + Regeneration)
Become nearly invincible
Set Gamemode to Creative
Switch yourself into Creative mode
Kill All Mobs
Instantly remove every mob from the world except players