> 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/fishing-trading.md).

# Fishing and Trading 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: fish
  amount: 10
```

## `fish`

Runs for fishing states with the fishing rod and caught entity, when present.

| Context              | Value                                   |
| -------------------- | --------------------------------------- |
| Event / payload      | `PlayerFishEvent`                       |
| Availability         | Paper and Spigot                        |
| PLAYER               | Player associated with this event       |
| SOURCE               | Quest player                            |
| TARGET               | Caught entity, if any                   |
| LOCATION             | Fishing hook location                   |
| TRIGGER\_ITEM / slot | Fishing rod / resolved main or off hand |
| Extra context        | `original_experience`                   |

Add catch\_match\_item to require caught item data; unfiltered fish can include casting and other fishing states. count: items uses caught stack size only.

## `piglin_barter`

Runs for piglin barter associated with a previously tracked player. Unattributed barters are skipped.

| Context              | Value                             |
| -------------------- | --------------------------------- |
| Event / payload      | `PiglinBarterEvent`               |
| Availability         | Paper and Spigot                  |
| PLAYER               | Player associated with this event |
| SOURCE               | Bartering piglin                  |
| TARGET               | Bartering piglin                  |
| LOCATION             | Target/entity location            |
| TRIGGER\_ITEM / slot | Barter input / HAND               |

## `trade`

Observes an entity-merchant trade such as a villager/wandering trader transaction.

| Context              | Value                               |
| -------------------- | ----------------------------------- |
| Event / payload      | `PlayerTradeEvent`                  |
| Availability         | Paper mode and event class required |
| PLAYER               | Player associated with this event   |
| SOURCE               | Quest player                        |
| TARGET               | Merchant entity                     |
| LOCATION             | Merchant location                   |
| TRIGGER\_ITEM / slot | Trade result / HAND                 |

## `purchase`

Observes a player merchant purchase, including the available virtual-merchant path.

| Context              | Value                                                   |
| -------------------- | ------------------------------------------------------- |
| Event / payload      | `PlayerPurchaseEvent`                                   |
| Availability         | Paper mode and event class required                     |
| PLAYER               | Player associated with this event                       |
| SOURCE               | Quest player                                            |
| TARGET               | Merchant only when represented by an Entity             |
| LOCATION             | Entity merchant location if available, otherwise player |
| TRIGGER\_ITEM / slot | Trade result / HAND                                     |

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