Event Skills
Skills that react to calendar events and season changes, with the IsEvent condition, the startEvent_<id> and endEvent_<id> signals, the event placeholders and the season-start and season-end skill triggers.
Before you copy an example
- Events need the calendar (
enabled: trueincalendar.yml, the default) and run in the worlds that have a season. The shipped events arechristmas(25/12 to 28/12),newyear(1/1),halloween(31/10 to 2/11) andeaster(20/4 to 24/4). Theexampleevent ships disabled. - Event ids are lowercased when the event file loads, so conditions and signals use the lowercase id.
- Run
/mm reloadafter editing a skill file and/ms reloadafter editing a season or event file, see Common Examples.
Holiday snow
Snow falls around every player while a holiday event runs, whatever the weather.
Holiday_Flurries:
Cooldown: 0.5
Conditions:
- isevent{e=christmas,newyear}
Skills:
- effect:particles{p=SNOWFLAKE;amount=10;hSpread=6;ySpread=4;speed=0.02;yOffset=3;audience=self} @Self
skill-triggers:
player-tick-particles:
- Holiday_Flurries
List it in
seasons/winter.yml, since both events fall inside the shipped winter (December 4 to March 3).
A mistyped id never matches and prints nothing. isevent is false in the Nether and the End, and stays true in a world under worlds-without-events, which only silences an event's start and stop lines.
Halloween nights
Adds a low rumble on the nights of an event.
Halloween_Night:
Cooldown: 45
Conditions:
- isevent{e=halloween}
- timerange{from=20;to=4}
Skills:
- effect:sound{s=entity.lightning_bolt.thunder;v=0.4;p=0.6;audience=self} @Self
List it under
player-tickinseasons/fall.yml, which covers those days in the shipped calendar. The shipped event also printsHalloween has started!in chat when it starts.
Event reminder
Tells players that an event is about to start.
Event_Reminder:
Cooldown: 600
Conditions:
- comparevalues{value1=<mythicseasons.daysuntilnextevent>;operator=GTE;value2=1}
- comparevalues{value1=<mythicseasons.daysuntilnextevent>;operator=LTE;value2=2}
Skills:
- message{m="<gold>An event starts within two days. Type /ms getinfo to see which."} @Self
List it under
player-tickin every season.daysuntilnexteventis the number of days until the next event withtype: datedanddisplay-event: truestarts, or-1when there is none or the world has no season, which the first condition filters out.
A town crier
A mob announces to the whole world that an event has started or ended.
Town_Crier:
Type: VILLAGER
Display: '<gold>Town Crier'
Skills:
- message{m="<gold>The town crier shouts that Halloween has begun."} @PlayersInWorld ~onSignal:startEvent_halloween
- message{m="<gold>The town crier shouts that Halloween is over."} @PlayersInWorld ~onSignal:endEvent_halloween
- skill{s=Christmas_Fanfare} @PlayersInWorld ~onSignal:startEvent_christmas
Christmas_Fanfare:
Skills:
- title{title="<red>Merry Christmas";subtitle="<gray>The festival has begun";fadein=10;duration=60;fadeout=20}
- effect:sound{s=entity.firework_rocket.shoot;v=0.8;p=1;audience=target}
Spawn the mob with
/mm mobs spawn Town_Crierbefore the date changes: every active MythicMobs mob in the world getsstartEvent_<id>when an event starts andendEvent_<id>when it ends. To announce an event without a mob, use thecommandslists of the event file.
A season begins
Welcomes every player when a world enters a season.
Spring_Arrives:
Skills:
- title{title="<light_purple>Spring";subtitle="<gray>The blossoms are opening";fadein=10;duration=60;fadeout=20} @PlayersInWorld{targetself=true}
- effect:particles{p=CHERRY_LEAVES;amount=40;hSpread=3;ySpread=2;speed=0.02;yOffset=2;audience=target} @PlayersInWorld{targetself=true}
skill-triggers:
season-start:
- Spring_Arrives
List it under
season-startinseasons/spring.yml. It runs one tick after the change, cast by the world's first player, whichtargetself=truekeeps among the targets.
Nothing is cast when no player is in the world (it is not kept for later), at server start for the season a world is already in, or when another plugin cancels the season change.
A season ends
Says goodbye to a season, with its own sound, when a world leaves it.
Winter_Farewell:
Skills:
- message{m="<aqua>The last snow melts. Winter is over."} @PlayersInWorld{targetself=true}
- effect:sound{s=block.snow.place;v=0.6;p=0.8;audience=target} @PlayersInWorld{targetself=true}
skill-triggers:
season-end:
- Winter_Farewell
List it under
season-endinseasons/winter.yml. The world's first player casts it before the world switches season, also on/ms disable, and the new season'sseason-startskills follow one tick later.
As with season-start, nothing is cast when no player is in the world or when the change is cancelled.
Testing events and seasons
Move the date of a test world with /ms setdate, which needs the mythicseasons.admin permission. The format is dd/mm/yyyy, or mm/dd/yyyy with american-date-format: true:
/ms setdate 30/10/0001
/ms setdate 31/10/0001
/ms setdate 03/11/0001
The first command answers
Date set to 30/10/1. The second enters Halloween and sendsstartEvent_halloween, and the third leaves it and sendsendEvent_halloween.
An event starts only when the date moves into its range from a day outside it. While sync-time-with-real-world is true in calendar.yml, the conditions, placeholders and /ms getinfo keep reading the real date. /ms event start halloween and /ms event stop halloween start and stop an event without moving the date, with the same signals, see Commands and Permissions.
While automatic-season-cycling is true, moving the date can change the season too, which casts the season triggers. /ms nextseason tests them without picking a date: it moves the world to the next season of season-cycle and the date to that season's first day, and gives no reply of its own. Players in the world see the new season's start message (for example Winter has started!) while send-message-on-season-cycle is true in config.yml.
Related pages
- Events and Event Options: event files, schedules and commands.
- Triggers:
season-start,season-endand the event signals. - Calendar: the date and the clock.
- IsEvent: the condition with its aliases and attributes.