Minecraft /damage command
Java EditionBedrock EditionSince Java 1.19.4 (23w06a) / Bedrock 1.18.10
Quick answer: Applies a set amount of damage to entities, with an optional damage type or attacker. Syntax:
damage <target> <amount> [<damageType>] [at <location> | by <entity> [from <cause>]]/damage hurts entities directly, using the game's real damage logic: armor, enchantments and resistances all apply. You choose the damage type (generic, on_fire, freeze, magic...) and optionally credit the hit to an attacker entity or a location, which matters for kill attribution, aggro and death messages.
Syntax
| Edition | Syntax |
|---|---|
| Java | damage <target> <amount> [<damageType>] [at <location> | by <entity> [from <cause>]] |
| Bedrock | damage <target: target> <amount: int> <cause: DamageCause> entity <damager: target> OR damage <target: target> <amount: int> [cause: DamageCause] |
Targets / arguments: Any entity with health (players and mobs). Requires: Cheats enabled / operator level 2 (Java), 1 (Bedrock).
Examples
/damage @e[type=creeper,limit=1] 10Deal 5 hearts of generic damage to the nearest creeper
/damage @p 6 minecraft:on_fireDeal fire damage to the nearest player
/damage @e[type=zombie,limit=1] 20 minecraft:mob_attack by @sDamage a zombie as if you hit it yourself
Tips
- Amount is in hit points: 2 = one heart.
- Use minecraft:kill or /kill for guaranteed removal; /damage respects totems and resistance.
- Bedrock calls the damage type argument cause: DamageCause.