config.yml
##Introduction
config.yml holds Aevum's action engine — rules that let a running timer or stopwatch fire console commands, messages and broadcasts when conditions pass. It's how you turn a clock into gameplay: hand out rewards every minute, announce when a timer ends, ping a team at a checkpoint, and so on.
Your live timers and stopwatches are not stored here — they live in data.json, managed by the commands and restored on restart. config.yml only defines the action rules. Run /aevum reload after editing.
##How it works
Actions are grouped under stopwatch.actions and timer.actions. Each group runs when all of its conditions pass; then every line under actions executes.
timer:
actions:
- id: example
conditions:
- "%event% == end"
actions:
- "broadcast: &cThe timer has ended!"###Audience
A group is evaluated once per player in the instance's audience, which depends on its scope:
| Scope | Audience |
|---|---|
| global | Every online player |
| player | The owner |
| team | Online team members |
Because evaluation is per-player, %player% and other per-player placeholders resolve correctly inside both conditions and actions.
##Conditions
Each condition is a string of the form:
"%placeholder% OP value"OP is one of ==, !=, >, <, >=, <=. All conditions in a group must pass for its actions to run.
conditions:
- "%player_is_op% == no"
- "%divisible_by_60% == true"Any %placeholder% that isn't one of Aevum's context tokens (below) is resolved through PlaceholderAPI — e.g. %player_is_op%.
##Actions
Each action is a string of the form "<type>: <payload>". The type is one of:
| Type | What it does |
|---|---|
| console | Runs the payload as a console command. |
| player | Runs the payload as a command as the player. |
| message | Sends the payload to the player. |
| broadcast | Broadcasts the payload to the whole server. |
actions:
- "console: give %player% diamond 64"
- "message: &b&l⭐ 60 SECONDS HAVE PASSED, YOU HAVE WON A STACK OF DIAMONDS."Color codes (&) and PlaceholderAPI placeholders work in message and broadcast payloads.
##Context placeholders
Aevum injects these tokens into conditions and actions depending on the event:
| Event | Tokens |
|---|---|
| Timer (on end) | %event% (= end), %id%, %name%, %time%, %seconds% |
| Stopwatch (each second) | %event% (= tick), %id%, %name%, %time%, %seconds% |
| On mark (both) | %event% (= mark), %name%, %mark%, %seconds%, %time%, %mark_time% |
| Both | %player%, %scope%, %owner%, %team% |
###%divisible_by_<n>%
A helper that is true when %seconds% is a non-zero multiple of <n> — perfect for "every N seconds" rules (e.g. %divisible_by_30%). To exclude overlaps, combine conditions. For example, "every 30 seconds but not every 60":
conditions:
- "%divisible_by_30% == true"
- "%divisible_by_60% == false"##Full default config
# Action engine
#
# Each action group runs when ALL of its conditions pass. The audience depends on the
# instance scope: global -> every online player, player -> the owner, team -> online team
# members. Groups are evaluated once per player in that audience, so %player% and per-player
# placeholders work for rewards and messages.
#
# Conditions: "%placeholder% OP value" with OP one of == != > < >= <=
# Actions: "<type>: <payload>" with type one of console player message broadcast
#
# Context placeholders provided by Aevum:
# timer (on end): %event% (=end), %id%, %name%, %time%, %seconds%
# stopwatch (each sec): %event% (=tick), %id%, %name%, %time%, %seconds%
# on mark (both): %event% (=mark), %name%, %mark%, %seconds%, %time%, %mark_time%
# both: %player%, %scope%, %owner%, %team%
# %divisible_by_<n>% true when %seconds% is a non-zero multiple of <n> (e.g. %divisible_by_30%).
# For exclusions just combine conditions, e.g. divisible by 30 but not 60:
# - "%divisible_by_30% == true"
# - "%divisible_by_60% == false"
# Any other %placeholder% is resolved through PlaceholderAPI (e.g. %player_is_op% -> yes/no).
stopwatch:
actions:
- id: stopwatch_1
conditions:
- "%player_is_op% == no"
- "%divisible_by_60% == true"
actions:
- "console: give %player% diamond 64"
- "message: &b&l⭐ 60 SECONDS HAVE PASSED, YOU HAVE WON A STACK OF DIAMONDS."
timer:
actions:
- id: timer_3
conditions:
- "%event% == end"
- "%player% == 33drygo"
actions:
- "console: ban %player% 33drygo is dumb"
- "broadcast: &c☠️ 33drygo was banned for being dumb."##Explanation of the examples
stopwatch_1— for every non-OP player, every 60 seconds the stopwatch is running, gives them a stack of diamonds and a message. Because stopwatches fire atickevent each second,%divisible_by_60%is what limits it to once a minute.timer_3— when a timer ends (%event% == end) and the owner is33drygo(%player% == 33drygo), bans them and broadcasts why. A playful example of gating an end action on a specific player.
Stopwatch actions are checked every second (the tick event), so always gate them with %divisible_by_<n>% or another condition — otherwise they'd fire once per second. Timer end actions fire once, when the countdown reaches zero.