> ## Documentation Index
> Fetch the complete documentation index at: https://docs.borntocraftstudio.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Item Events

> React to item-related events like enchanting, repairing, and trading.

Events concerning item modification and trade.

## Event Library

<CardGroup cols={2}>
  <Card title="Enchant Item" icon="wand-magic-sparkles" href="#enchant-event">
    Triggers upon enchanting an item.
  </Card>

  <Card title="Repair Anvil" icon="hammer" href="#anvil-repair-event">
    Triggers upon anvil repair.
  </Card>

  <Card title="Villager Trade" icon="shop" href="#villager-trade-event">
    Triggers upon trading.
  </Card>

  <Card title="Item Frame" icon="image" href="#item-frame-place-event">
    Triggers on frame interactions.
  </Card>
</CardGroup>

## Configuration

### `enchant_event`

Triggers when using an enchanting table.

<ResponseField name="enchantment" type="Enchantment">
  The enchantment being applied (e.g. `SHARPNESS`).
</ResponseField>

<ResponseField name="minLevel" type="Int">
  Minimum level of the enchantment.
</ResponseField>

### `anvil_repair_event`

Triggers when repairing in an anvil.

<ResponseField name="material" type="Material">
  The item type being repaired.
</ResponseField>

### `villager_trade_event`

Triggers when a trade is completed.

<ResponseField name="profession" type="Profession">
  Villager profession (e.g. `LIBRARIAN`, `ARMORER`).
</ResponseField>

<ResponseField name="result" type="Material">
  The item received.
</ResponseField>

### `item_frame_place_event`

Triggers when an item is placed into an item frame.

<ResponseField name="material" type="Material">
  The item placed.
</ResponseField>

## Examples

<CodeGroup>
  ```yaml Sharpness V theme={null}
  enchant_event:
    enchantment: SHARPNESS
    minLevel: 5
    actions:
      - lightning_action:
          location: "%player_location%"
  ```

  ```yaml Trade Master theme={null}
  villager_trade_event:
    profession: CARTOGRAPHER
    actions:
      - title_action:
          title: "<gold>Explorer!"
          subtitle: "You traded with a Cartographer"
  ```
</CodeGroup>
