← Back to Command Directory ← Back to Home

/damage

Applies a specified amount of damage to targeted entities, with optional damage type and source entity.

Syntax

/damage <target> <amount> [<damageType>] [at <location>]
/damage <target> <amount> [<damageType>] [by <entity>] [from <cause>]

Parameters

NameRequiredDescription
targetYesThe entity/entities to deal damage to.
amountYesAmount of damage to apply (in half-hearts).
damageTypeNoThe damage type identifier (e.g., minecraft:mob_attack, minecraft:fire). Affects armor, enchantment resistance, and death messages.
entityNoThe entity to credit as the direct attacker (used with by).
causeNoThe entity to credit as the indirect cause (used with from).
locationNoThe coordinates for location-based damage (used with at).

Examples

/damage @e[type=zombie,limit=1] 5
/damage @p 3 minecraft:fire
/damage @e[type=pig] 10 minecraft:mob_attack by @p

Notes

Related Commands