Triggers trigger/entity_damage

Entity Damage Trigger

Fires whenever an entity takes damage. Optionally filter by entity type.

Note: Cancel this event with Event Cancel to prevent the damage from being applied. The damager output is an entity — use the Is Player node to check whether a player caused the damage and extract the Player reference.

Outputs

NameTypeDescription
exec exec Fires when an entity takes damage.
entity entity The entity that was damaged.
damager entity Entity or player that caused the damage (null if caused by the environment, e.g. fall or fire).
cause string Damage cause (e.g. ENTITY_ATTACK, FALL, FIRE, PROJECTILE).
damage number Raw damage amount before armour reduction.
location location Location of the entity when damaged.

Properties

KeyTypeDefaultDescription
entityType string "" Only fire for this entity type. Leave blank for any.