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

# Player Events

> Trigger actions based on player activities like fishing, drops, and bed usage.

Comprehensive triggers for player-centric actions.

## Event Library

<CardGroup cols={2}>
  <Card title="Movement" icon="person-running" href="#movement-events">
    Sneak, Sprint, Flight, Teleport.
  </Card>

  <Card title="Interaction" icon="hand-pointer" href="#interaction-events">
    Bed, Bucket, Drops.
  </Card>

  <Card title="Status" icon="heart-pulse" href="#status-events">
    Respawn, Level, Gamemode.
  </Card>

  <Card title="Fishing" icon="fish" href="#player-fish-event">
    Casting and catching.
  </Card>

  <Card title="Portal" icon="dungeon" href="#player-portal-event">
    Nether/End portal usage.
  </Card>

  <Card title="Harvest" icon="wheat" href="#player-harvest-block-event">
    Crop harvesting.
  </Card>
</CardGroup>

## Configuration

### Movement Events

Events related to physical movement states.

* `player_toggle_sneak_event`: Toggling sneak.
* `player_toggle_sprint_event`: Toggling sprint.
* `player_toggle_flight_event`: Toggling creative flight.
* `player_teleport_event`: Teleporting via command or plugin.

### Interaction Events

* `player_bed_enter_event`: Getting into bed.
* `player_bed_leave_event`: Getting out of bed.
* `player_drop_item_event`: Dropping items (Q).
* `player_swap_hand_items_event`: Swapping offhand (F).

### Status Events

* `player_respawn_event`: Respawning after death.
* `player_level_change_event`: XP level change.
* `player_gamemode_change_event`: Switching gamemode.
* `player_changed_world_event`: Moving between worlds.

### `player_fish_event`

Triggers when using a fishing rod.

<ResponseField name="state" type="FishingState">
  State to filter: `CAUGHT_FISH`, `FISHING`, `REEL_IN`, `IN_GROUND`.
</ResponseField>

## Examples

<CodeGroup>
  ```yaml Welcome Back theme={null}
  player_respawn_event:
    actions:
      - title_action:
          title: "<green>Respawned!"
  ```

  ```yaml Sneak Attack theme={null}
  player_toggle_sneak_event:
    actions:
      - potion_effect_action:
          type: INVISIBILITY
          duration: 20
  ```
</CodeGroup>
