Skip to content

Ambient Events

okereke-dev edited this page Jul 4, 2026 · 4 revisions

Ambient Events

triggers.yml defines scheduled messages/sounds tied to time of day, weather changes, and block breaks. All events are checked once per second for every online player who hasn't disabled effects (/rpgmood toggle).


Time events

Fire when the world's time-of-day ticks (0–24000) crosses within 100 ticks of a configured time, with a 10-minute cooldown per event key to avoid re-firing every second while the game clock sits near that value.

time_events:
  dawn_arrival:
    trigger: "on_time_change"
    time: 2300
    message: "&e[Ambient] &7Dawn breaks. The world stirs anew, and the air tastes of fresh danger."
    sound: "entity.chicken.egg"
  • time — Minecraft world time (0–24000). Common reference points: 0 sunrise, 6000 midday, 12000 sunset, 18000 midnight.
  • message — supports &-color codes.
  • sound — any Bukkit Sound enum name (lowercase, dotted), e.g. entity.wolf.howl.

Matching correctly wraps around midnight (tick 23999 → 0), so an event configured at time: 0 fires reliably instead of only when the clock lands on exactly 0.

Weather events

Fire on weather transitions (not on a fixed schedule) — comparing each world's current weather (clear / rain / thunder) against what it was last tick.

weather_events:
  rain_start:
    weather: "rain"
    state: "start"
    message: "&bThe sky darkens and rain begins to fall over {location}."
    sound: "ambient.weather.rain"
  rain_end:
    weather: "rain"
    state: "stop"
    message: "&aThe rain eases, leaving behind a glistening path."
    sound: "entity.item.pickup"
  • weatherrain or thunder. (clear isn't itself a triggerable target — it's just the state when neither is active.)
  • statestart (weather just began) or stop (weather just ended).
  • Same 10-minute per-event cooldown as time events.

Block-break events

Chance-based ambient message when a specific block type is broken.

block_events:
  diamond_ore:
    trigger: "on_block_break"
    block: "DIAMOND_ORE"
    chance: 30
    message: "&e[Ambient] &bAn ancient energy emanates from the broken crystal..."
  • block — a Bukkit Material enum name.
  • chance — integer 0–100, percent chance per matching block break.
  • No cooldown — every matching break gets an independent roll.

Adding your own

All three sections accept as many keys as you want — the key name itself (dawn_arrival, rain_start, diamond_ore, ...) is just an internal identifier used for cooldown tracking, and can be anything descriptive.

Clone this wiki locally