> For the complete documentation index, see [llms.txt](https://enchantedmobs.superiormc.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enchantedmobs.superiormc.cn/for-ultimatequest/configuration/triggers/combat.md).

# Combat, Damage, and Death Triggers

Each section documents the current event context. PLAYER is the player credited with quest progress; TARGET is not automatically PLAYER. Missing values remain absent. All of these triggers observe progress and do not expose mutable damage/drop results.

## Configuration example

```yaml
source:
  trigger: attack
  amount: 10
```

## `attack`

Runs for damage attributable to an attacking player, including attributable projectiles.

| Context              | Value                                                        |
| -------------------- | ------------------------------------------------------------ |
| Event / payload      | `EntityDamageByEntityEvent`                                  |
| Availability         | Paper and Spigot                                             |
| PLAYER               | Player associated with this event                            |
| SOURCE               | Quest player                                                 |
| TARGET               | Damaged/attempted target                                     |
| LOCATION             | Target/entity location                                       |
| TRIGGER\_ITEM / slot | Melee main hand, trident item, or tracked firing weapon/slot |
| Extra context        | `original_damage`, `damage_cause`                            |

## `melee_attack`

Runs only when the direct damager is the player; projectile damage is excluded.

| Context              | Value                                                |
| -------------------- | ---------------------------------------------------- |
| Event / payload      | `EntityDamageByEntityEvent`                          |
| Availability         | Paper and Spigot                                     |
| PLAYER               | Player associated with this event                    |
| SOURCE               | Quest player                                         |
| TARGET               | Damaged/attempted target                             |
| LOCATION             | Target/entity location                               |
| TRIGGER\_ITEM / slot | Main hand / HAND                                     |
| Extra context        | `original_damage`, `attack_cooldown`, `damage_cause` |

## `damage`

Runs when a player receives damage, including environmental causes.

| Context              | Value                                                                    |
| -------------------- | ------------------------------------------------------------------------ |
| Event / payload      | `EntityDamageEvent`                                                      |
| Availability         | Paper and Spigot                                                         |
| PLAYER               | Player associated with this event                                        |
| SOURCE               | Resolved attacker; may be absent for environmental damage                |
| TARGET               | Quest player                                                             |
| LOCATION             | Player location                                                          |
| TRIGGER\_ITEM / slot | Absent                                                                   |
| Extra context        | `original_damage`, `damage_cause`, `damage_by_entity`, `damage_by_block` |

## `damage_by_entity`

Runs when a player receives entity-caused damage.

| Context              | Value                                                                    |
| -------------------- | ------------------------------------------------------------------------ |
| Event / payload      | `EntityDamageByEntityEvent`                                              |
| Availability         | Paper and Spigot                                                         |
| PLAYER               | Player associated with this event                                        |
| SOURCE               | Resolved attacker or direct damager                                      |
| TARGET               | Quest player                                                             |
| LOCATION             | Player location                                                          |
| TRIGGER\_ITEM / slot | Absent                                                                   |
| Extra context        | `original_damage`, `damage_cause`, `damage_by_entity`, `damage_by_block` |

## `kill`

Runs for a death credited to a player killer. No credited player means no quest event.

| Context              | Value                             |
| -------------------- | --------------------------------- |
| Event / payload      | `EntityDeathEvent`                |
| Availability         | Paper and Spigot                  |
| PLAYER               | Player associated with this event |
| SOURCE               | Quest player                      |
| TARGET               | Dead entity                       |
| LOCATION             | Target/entity location            |
| TRIGGER\_ITEM / slot | Absent                            |
| Extra context        | `original_experience`             |

## `death`

Runs when the dead entity is a player. This is victim-side progress.

| Context              | Value                             |
| -------------------- | --------------------------------- |
| Event / payload      | `EntityDeathEvent`                |
| Availability         | Paper and Spigot                  |
| PLAYER               | Player associated with this event |
| SOURCE               | Player killer if available        |
| TARGET               | Quest player                      |
| LOCATION             | Player location                   |
| TRIGGER\_ITEM / slot | Absent                            |
| Extra context        | `original_experience`             |

## `regain`

Runs when a player regains health. It counts healing events, not restored health points.

| Context              | Value                             |
| -------------------- | --------------------------------- |
| Event / payload      | `EntityRegainHealthEvent`         |
| Availability         | Paper and Spigot                  |
| PLAYER               | Player associated with this event |
| SOURCE               | Quest player                      |
| TARGET               | Absent                            |
| LOCATION             | Player location                   |
| TRIGGER\_ITEM / slot | Absent                            |
| Extra context        | `original_amount`                 |

## `shield_block`

Runs through the dedicated actual-shield-block routing, not a second generic damage subscription.

| Context              | Value                                                 |
| -------------------- | ----------------------------------------------------- |
| Event / payload      | `EntityDamageByEntityEvent`                           |
| Availability         | Paper and Spigot                                      |
| PLAYER               | Player associated with this event                     |
| SOURCE               | Resolved attacker or direct damager                   |
| TARGET               | Quest player                                          |
| LOCATION             | Player location                                       |
| TRIGGER\_ITEM / slot | Absent                                                |
| Extra context        | `original_damage`, `damage_cause`, `damage_by_entity` |

## `shield_disable`

Runs when a player shield is disabled.

| Context              | Value                               |
| -------------------- | ----------------------------------- |
| Event / payload      | `PlayerShieldDisableEvent`          |
| Availability         | Paper mode and event class required |
| PLAYER               | Player associated with this event   |
| SOURCE               | Event damager                       |
| TARGET               | Quest player                        |
| LOCATION             | Player location                     |
| TRIGGER\_ITEM / slot | Absent                              |

## `attempt_smash_attack`

Runs for a player smash-attack attempt unless the event result is DENY.

| Context              | Value                               |
| -------------------- | ----------------------------------- |
| Event / payload      | `EntityAttemptSmashAttackEvent`     |
| Availability         | Paper mode and event class required |
| PLAYER               | Player associated with this event   |
| SOURCE               | Quest player                        |
| TARGET               | Damaged/attempted target            |
| LOCATION             | Target/entity location              |
| TRIGGER\_ITEM / slot | Event weapon / HAND                 |

## `knockback`

Observes player knockback. The source is the pushing entity when exposed, otherwise the player.

| Context              | Value                                           |
| -------------------- | ----------------------------------------------- |
| Event / payload      | `EntityKnockbackEvent`                          |
| Availability         | Paper mode and event class required             |
| PLAYER               | Player associated with this event               |
| SOURCE               | Pushing entity if exposed, otherwise the player |
| TARGET               | Quest player                                    |
| LOCATION             | Player location                                 |
| TRIGGER\_ITEM / slot | Absent                                          |

## `combust`

Runs when a player starts combusting.

| Context              | Value                             |
| -------------------- | --------------------------------- |
| Event / payload      | `EntityCombustEvent`              |
| Availability         | Paper and Spigot                  |
| PLAYER               | Player associated with this event |
| SOURCE               | Quest player                      |
| TARGET               | Absent                            |
| LOCATION             | Player location                   |
| TRIGGER\_ITEM / slot | Absent                            |
| Extra context        | `original_duration`               |

## `creeper_explode`

Observes explosion priming when a player can be associated, normally the creeper target.

| Context              | Value                             |
| -------------------- | --------------------------------- |
| Event / payload      | `ExplosionPrimeEvent`             |
| Availability         | Paper and Spigot                  |
| PLAYER               | Player associated with this event |
| SOURCE               | Exploding entity                  |
| TARGET               | Quest player                      |
| LOCATION             | Target/entity location            |
| TRIGGER\_ITEM / slot | Absent                            |
| Extra context        | `original_radius`                 |

[Trigger overview](/for-ultimatequest/configuration/triggers.md) · [Event conditions](/for-ultimatequest/configuration/conditions.md)
