> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/edevents/features/events.md).

# Creating Events

Each file in `plugins/EdEvents/events/` is one event; the file name is the event id (`ore-rush.yml` → `ore-rush`). Subfolders are allowed. Every key is optional: missing keys come from `event-defaults` in `config.yml`. `/events reload` reloads them.

A minimal event:

```yaml
name: "&b&lOre Rush"
description: ["&7Only ores count!"]
duration: 8m
objective:
  type: BLOCKS_MINED
  name: "Ores"
  filter:
    blocks: ["*_ORE", "ANCIENT_DEBRIS"]
rewards:
  placements:
    1: ["[GIVE-ECO] tokens 15000", "[FIREWORK] AQUA"]
    2: ["[GIVE-ECO] tokens 7500"]
    3: ["[GIVE-ECO] tokens 3000"]
```

## General

| Key                     | Description                                                                                                                                                  |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `enabled`               | `false` skips the file.                                                                                                                                      |
| `name`                  | Display name (`{event}`).                                                                                                                                    |
| `description`           | List of lines (`{description}` joins them with a space).                                                                                                     |
| `duration`              | `10m`, `1h`, `90s`... Can be overridden by `/events start <id> <duration>`.                                                                                  |
| `type`                  | `LEADERBOARD`, `FIRST_TO_GOAL` or `COMMUNITY`.                                                                                                               |
| `permission`            | Players need this permission to score (empty = everyone).                                                                                                    |
| `leaderboard-size`      | How many `{top_<n>_*}` placeholders are filled (min 10).                                                                                                     |
| `countdown-at`          | Seconds left at which `messages.countdown` is broadcast: `[60, 30, 10, 5, 4, 3, 2, 1]`.                                                                      |
| `end-when-goal-reached` | COMMUNITY: end as soon as the goal is reached (`true`) or keep running and just announce `messages.goal-reached` (`false`).                                  |
| `milestones`            | Values at which `messages.milestone` (COMMUNITY: server total) or `messages.player-milestone` (other types: the player's own score) is sent: `[1000, 5000]`. |
| `placeholders`          | Extra `{key}: value` pairs usable in every text of this event.                                                                                               |

## Objective

```yaml
objective:
  type: BLOCKS_MINED      # BLOCKS_MINED | MOBS_KILLED | DAMAGE_DEALT | CURRENCY_EARNED | CUSTOM
  name: "Blocks"          # {objective}
  goal: 1000              # FIRST_TO_GOAL / COMMUNITY target; also drives {percent}, {bar}
  count-enchant-blocks: false   # BLOCKS_MINED: also count enchant / explosion / bomb / drill blocks
  filter:
    blocks: []            # material names, * wildcards: [DIAMOND_ORE, "*_ORE"]
    mobs: []              # entity types, custom names, host mob ids, tiers or "boss": [ZOMBIE, "cow-*", legendary, boss]
    worlds: []            # world names
    currencies: []        # CURRENCY_EARNED: which currencies count
    permission: ""        # extra permission required to score
    multiplier: 1.0       # progress multiplier
    min-amount: 0         # ignore increments below this (after the multiplier)
    require-host-tool: false   # only count when the host plugin's own tool was used
```

* `BLOCKS_MINED` — **raw blocks mined by hand** with the host plugin (or vanilla block breaks without a host). Blocks broken by enchants, explosions, bombs, drills and autominers only count when `count-enchant-blocks: true`. Batched sources (EdPrison's block event, enchant sweeps) do not know the material, so a `blocks` filter only counts sources that report it.
* `MOBS_KILLED` — EdDungeons zone mob kills (filters match the mob config id such as `cow-legendary`, its tier `legendary` and `boss`), or vanilla kills elsewhere (entity type / custom name).
* `DAMAGE_DEALT` — damage dealt to mobs (EdDungeons sword hits, or vanilla damage).
* `CURRENCY_EARNED` — currency earned through the host plugin while the event runs (mining payouts, sells, mob rewards). Rewards given by EdEvents itself are not counted.
* `CUSTOM` — only `/events progress <player> <event> <amount>` and the API feed it. Use it for anything: votes, crates opened, quests...

## Scheduler (per event)

```yaml
scheduler:
  enabled: true      # may be picked automatically
  weight: 10         # higher = picked more often
  min-players: 1     # online players required
  cooldown: 2h       # minimum time between two automatic runs of this event
```

## Boss bar & action bar

```yaml
bossbar:
  enabled: true
  text: "&e&l{event} &7- &f{time_left} &8| &a{progress_formatted} &8(&f#{position}&8)"
  color: YELLOW           # PINK, BLUE, RED, GREEN, YELLOW, PURPLE, WHITE
  style: SEGMENTED_10     # SOLID, SEGMENTED_6, SEGMENTED_10, SEGMENTED_12, SEGMENTED_20
  progress: TIME          # TIME (drains), TIME_ELAPSED (fills), GOAL (community total / leader), PLAYER (own progress)
  flash-last-seconds: true
  flash-seconds: 10
  flash-color: RED
actionbar:
  enabled: true
  text: "&e⛏ &f{time_left_short} &8| &a{progress_formatted} &7{objective}"
```

Every player gets their own bar, so `{progress}`, `{position}`... are personal. See [Boss Bar & Action Bar](/p/edevents/features/displays.md) for how the action bar cooperates with the host plugin.

## Messages, titles & sounds

Every entry may be a string or a list; an empty string disables it. All [event placeholders](/p/edevents/features/placeholders.md) work, plus `{prefix}`.

```yaml
messages:
  start: [...]            # broadcast on start
  start-personal: [...]   # sent to each player with their own placeholders
  join-info: [...]        # sent to players who join while the event runs
  countdown: [...]        # at each `countdown-at` second ({time_left})
  end: [...]              # broadcast on end ({top_1_name}, {top_1_value_formatted}...)
  no-winner: [...]        # nobody scored
  cancelled: [...]        # stopped by reload / shutdown
  milestone: [...]        # COMMUNITY milestone ({milestone}, {milestone_formatted})
  player-milestone: [...] # personal milestone
  goal-reached: [...]     # COMMUNITY goal reached while `end-when-goal-reached: false`
  community-failed: [...] # COMMUNITY ended without reaching the goal
  start-actions: [...]    # actions run on start (no target player: use [BROADCAST], [CONSOLE]...)
  end-actions: [...]      # actions run on end

titles:                   # each: title, subtitle, fade-in, stay, fade-out (ticks)
  start: {title: "&e&l{event}", subtitle: "&7has started!", fade-in: 10, stay: 60, fade-out: 10}
  end: {...}
  countdown: {...}        # at each countdown second
  winner: {...}           # shown to the 1st place
  placed: {...}           # shown to the other placements

sounds:                   # "SOUND volume pitch" - empty to disable
  start: "ENTITY_ENDER_DRAGON_GROWL 1 1"
  end: "ENTITY_PLAYER_LEVELUP 1 1"
  countdown: "BLOCK_NOTE_BLOCK_PLING 1 2"
  milestone: "ENTITY_EXPERIENCE_ORB_PICKUP 1 1"
  winner: "UI_TOAST_CHALLENGE_COMPLETE 1 1"
  placed: "ENTITY_PLAYER_LEVELUP 1 1.5"
```

## Rewards

```yaml
rewards:
  offline-rewards: queue   # true = run now, false = skip, queue = deliver when the player joins
  placements:              # by final position (LEADERBOARD / FIRST_TO_GOAL / COMMUNITY top contributors)
    1: ["[GIVE-ECO] tokens 25000", "[MESSAGE] {prefix}&aYou won &e{event}&a!"]
    2: ["[GIVE-ECO] tokens 10000"]
    3: ["[GIVE-ECO] tokens 5000"]
  participation:           # everyone who scored at least min-progress (winners included)
    min-progress: 100
    actions: ["[GIVE-ECO] tokens 500"]
  community: []            # COMMUNITY: every participant (>= min-progress) when the goal is reached
  losers: []               # participants without a placement
  everyone: []             # every online player
```

Placement and winner texts get `{winner}`, `{position}`, `{position_suffix}`, `{value}` and `{value_formatted}` on top of the player placeholders. See [Actions & Rewards](/p/edevents/features/actions.md) for every action type.

## Winner announcement

```yaml
winner-announcement:
  enabled: true
  show-head: true
  placements: 1            # announce the top N
  lines: [...]             # lines containing {head} get one row of the face
  lines-no-head: [...]     # used when show-head is false or chat heads are disabled
```

See [Winner Announcement & Chat Heads](/p/edevents/features/winner-announcement.md).

## Examples shipped

| File                 | Shows                                                                 |
| -------------------- | --------------------------------------------------------------------- |
| `mining-frenzy.yml`  | Classic leaderboard with milestones and participation reward.         |
| `ore-rush.yml`       | Block filter with wildcards.                                          |
| `race-to-1000.yml`   | `FIRST_TO_GOAL` with a personal-progress boss bar.                    |
| `community-mine.yml` | `COMMUNITY` goal, milestones, community + top-contributor rewards.    |
| `mob-slayer.yml`     | `MOBS_KILLED` leaderboard.                                            |
| `boss-hunt.yml`      | `FIRST_TO_GOAL` on boss kills only (`boss`, mob ids, vanilla bosses). |
| `money-maker.yml`    | `CURRENCY_EARNED` (disabled by default — set your currency id).       |
