> 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/player-state.md).

# Effects, Air, Food, and Experience 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: air_change
  amount: 10
```

## `air_change`

Runs when a player remaining-air amount changes.

| Context              | Value                             |
| -------------------- | --------------------------------- |
| Event / payload      | `EntityAirChangeEvent`            |
| 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_air`, `previous_air`    |

## `food_level_change`

Runs when a player food level changes.

| Context              | Value                             |
| -------------------- | --------------------------------- |
| Event / payload      | `FoodLevelChangeEvent`            |
| 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_food_level`             |

## `exp_change`

Runs for a player experience-change event. It counts events, not XP units.

| Context              | Value                             |
| -------------------- | --------------------------------- |
| Event / payload      | `PlayerExpChangeEvent`            |
| 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_experience`             |

## `potion_effect`

Runs when a player potion effect changes. The selected duration comes from the changed effect.

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

## `effect_tick`

Observes a player effect-tick event. Effect details remain on the event.

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

## `exhaustion`

Observes a player exhaustion event when its class is available.

| Context              | Value                                |
| -------------------- | ------------------------------------ |
| Event / payload      | `EntityExhaustionEvent`              |
| Availability         | Optional class detection on any mode |
| PLAYER               | Player associated with this event    |
| SOURCE               | Quest player                         |
| TARGET               | Absent                               |
| LOCATION             | Player location                      |
| TRIGGER\_ITEM / slot | Absent                               |

## `pickup_experience`

Runs when a player picks up an experience orb.

| Context              | Value                               |
| -------------------- | ----------------------------------- |
| Event / payload      | `PlayerPickupExperienceEvent`       |
| Availability         | Paper mode and event class required |
| PLAYER               | Player associated with this event   |
| SOURCE               | Quest player                        |
| TARGET               | Absent                              |
| LOCATION             | Experience-orb location             |
| TRIGGER\_ITEM / slot | Absent                              |
| Extra context        | `original_experience`               |

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