/damage
Deal a set amount of damage to a player or mob.
Overview
What is the /damage command?
The /damage command deals a precise amount of damage to a target, optionally with a damage type and a source entity or location. Unlike /kill it doesn't always remove the target โ it subtracts hearts and triggers the normal hurt animation, knockback and death messages.
It's a newer command that's invaluable for custom combat, traps and minigame mechanics where you want fine control over how much hurt is applied.
When to use it: Use /damage to deal an exact amount of damage with realistic effects, instead of instantly killing with /kill.
At a glance
Syntax
/damage <target> <amount> [type]See it
What it does
Anatomy
Every part, explained
- 1
CommandRequired/damageApplies damage directly to an entity.
- 2
TargetRequired<target>Who takes the hit, e.g. @s or a mob.
- 3
AmountRequired<amount>Half-hearts of damage to deal, e.g. 5.
- 4
TypeOptional[type]Optional damage type, e.g. magic or fire.
Your turn
Try it yourself
Copy & paste
Examples
/damage @s 5Deal 5 damage to yourself.
/damage @e[type=zombie] 10Hurt every zombie for 10 damage.
/damage @s 6 magicDeal 6 magic damage (ignores armor).
Avoid these
Common mistakes
/damage @s/damage @s 5You must give an amount of damage.
/damage 5 @s/damage @s 5Target comes first, then the amount.
Good to know
Frequently asked questions
- How do you damage a player with a command?
- Run /damage <target> <amount> [type], e.g. /damage @s 6 to take 3 hearts of damage.
- What's the difference between /damage and /kill?
- /kill removes the entity outright; /damage subtracts a set amount of health with proper knockback, sounds and death messages.
- Can you set the damage type?
- Yes โ add a damage type like /damage @s 4 lava so the correct death message and resistances apply.
Keep going