> For the complete documentation index, see [llms.txt](https://seasons.advancedplugins.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://seasons.advancedplugins.net/features/event-system.md).

# Event System

AdvancedSeasons features a highly customizable events system, allowing users to create, modify, or delete in-game events to suit their specific needs. The provided examples in the `events.yml` file are just default configurations, serving as templates that can be tailored or expanded upon.

### Configuration File

{% code title="events.yml" lineNumbers="true" fullWidth="true" %}

```yaml
events:
  halloween:
    name: "&6Halloween"
    day: 8
    time: EVENING #NIGHT, MORNING, DAY, EVENING
    broadcast:
      - '&7Spooky Halloween is here! Beware of the darkness...'
    commands:
      - '[FOR ALL PLAYERS] give %player% pumpkin 1 name:&6Halloween_Special'
  christmas:
    name: "&2Christmas"
    day: 10
    time: MORNING #NIGHT, MORNING, DAY, EVENING
    broadcast:
      - '&7Merry Christmas! The world is covered in a festive spirit.'
    commands:
      - '[FOR ALL PLAYERS] give %player% cookie 1 name:&2Christmas_Treat'
      - '[FOR ALL PLAYERS] give %player% snowball 16 name:&fSnowball_Fight!'
  new_year:
    name: "&bNew Year"
    day: 11
    time: NIGHT #NIGHT, MORNING, DAY, EVENING
    broadcast:
      - '&7Happy New Year! May the new adventures begin!'
    commands:
      - '[FOR ALL PLAYERS] give %player% firework_rocket 1 name:&bNew_Year_Celebration'
  valentines:
    name: "&dValentine's Day"
    time: MORNING #NIGHT, MORNING, DAY, EVENING
    day: 2
    broadcast:
      - '&7Happy Valentine’s Day! Share the love with everyone around you.'
  easter:
    name: "&eEaster"
    time: MORNING #NIGHT, MORNING, DAY, EVENING
    day: 2
    broadcast:
      - '&7Happy Easter!'
```

{% endcode %}

### Flexibility and Customization

#### User-Created Events

* **Full Control**: Users have the freedom to define their own events, setting unique dates, times, broadcast messages, and commands.
* **Creativity and Personalization**: This feature enables server administrators to craft events that resonate with their community, be it server-specific holidays, special occasions, or unique themed events.

#### Modifying Default Events

* **Edit Existing Events**: The default events like Halloween, Christmas, New Year, Valentine's Day, and Easter can be modified to better fit the server's theme or preference.
* **Adjustable Settings**: Change the day, time, broadcast messages, and commands to create a custom experience for each event.

#### Deleting or Disabling Events

* **Removal Option**: Users can completely remove any default event if it doesn't align with their server's theme or if they prefer to create a completely unique set of events.
* **Disabling Feature**: If users wish to temporarily disable an event without deleting it, they can do so, allowing for flexibility in event management.

### Technical Structure

Each event in the `events.yml` file is structured with key elements:

* `name`: The display name of the event.
* `day`: The in-game day when the event occurs.
* `time`: The time of day for the event (e.g., NIGHT, MORNING, DAY, EVENING).
* `broadcast`: The messages broadcast to players during the event.
* `commands`: The set of commands executed during the event.

### Example

```yaml
custom_event:
  name: "&aCustom Event"
  day: 5
  time: DAY
  broadcast:
    - '&7A custom event is happening now!'
  commands:
    - '[FOR ALL PLAYERS] give %player% [item] [amount]'
```

This level of customization in the AdvancedSeasons plugin ensures that each Minecraft server can offer a unique and tailored experience, reflecting the creativity and preferences of its community.
