> ## 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.

# Enchantment Events

> List of events that can trigger enchantment mechanics.

# Enchantment Events

**Type:** `EnchantmentEvent` (enum)

Events represent the game actions that trigger enchantment mechanics. Each event corresponds to a Bukkit event that the extension listens for.

## Available Events

| Event                  | Triggered When                          | Bukkit Event                |
| :--------------------- | :-------------------------------------- | :-------------------------- |
| `PLAYER_ATTACK`        | Player hits an entity                   | `EntityDamageByEntityEvent` |
| `PLAYER_DEFEND`        | Player takes damage                     | `EntityDamageByEntityEvent` |
| `BLOCK_BREAK`          | Player breaks a block                   | `BlockBreakEvent`           |
| `BOW_SHOOT`            | Player shoots a bow or crossbow         | `EntityShootBowEvent`       |
| `PROJECTILE_HIT`       | A shot projectile hits an entity        | `ProjectileHitEvent`        |
| `ITEM_CONSUME`         | Player eats or drinks an item           | `PlayerItemConsumeEvent`    |
| `PLAYER_DEATH`         | Player dies                             | `PlayerDeathEvent`          |
| `PLAYER_INTERACT`      | Player right/left clicks                | `PlayerInteractEvent`       |
| `ARMOR_EQUIP`          | Player equips or unequips armor         | Internal listener           |
| `ITEM_DAMAGE`          | An item takes durability damage         | Internal listener           |
| `FALL_DAMAGE`          | Player takes fall damage                | `EntityDamageEvent`         |
| `ENVIRONMENTAL_DAMAGE` | Non-entity damage (fire, lava, kinetic) | `EntityDamageEvent`         |
| `PLAYER_MOVE`          | Player moves (throttled)                | `PlayerMoveEvent`           |

## Usage

Events are used within `EnchantmentMechanic` to determine **when** mechanics should execute:

```json theme={null}
{
  "mechanics": [
    {
      "event": "PLAYER_ATTACK",
      "criteria": [...],
      "actions": ["combat:lifesteal_action"],
      "runOnLevel": 1,
      "chance": 100
    }
  ]
}
```
