Calendar
calendar.yml in plugins/MythicSeasons/ gives every world with a season a date, a weekday and a clock. The date decides when seasons change and events run. /ms reload reads the file again.
A file without an enabled line has the calendar off, although the shipped file has enabled: true.
General
| Option | Default | What it does |
|---|---|---|
enabled |
true |
Master switch. When off, no days are counted and no event is active after a start or reload. An empty months list turns it off too. |
american-date-format |
false |
Reads dates as month/day in /ms setdate, event files and the IsDate condition. Season start dates are always <Month> <day>. |
- With the calendar off, events still start and stop on a date change from
/ms setdate,/ms nextseasonor a real midnight in synced mode, which also sets the season withautomatic-season-cycling. - With
american-date-format: true, swap the numbers in the shipped event files, orchristmas,easterandhalloweenare skipped with a warning.
Real time
| Option | Default | What it does |
|---|---|---|
calendar-is-real-life-days |
false |
Moves the date one day at each real midnight in time-sync-timezone, counting days the server was off as one date change after start. The sky keeps in-game speed. No effect in synced mode. |
sync-time-with-real-world |
false |
Synced mode: worlds with a season use the real time, date, weekday and month lengths. The sky follows the real time only while modify-daynight-length is on in config.yml. |
time-sync-offset |
0 |
Shifts the synced sky by this many ticks (1000 = one in-game hour, positive = ahead). The clock text and time placeholders keep the real time. |
time-sync-timezone |
system |
Time zone for calendar-is-real-life-days and synced mode: system (the server's zone) or an ID such as Europe/London. An unknown ID logs a warning and uses system. |
- Synced mode needs twelve months in calendar order and seven weekdays starting with Monday.
- In synced mode a date set with
/ms setdateis never read back, and/ms pausetimerefuses worlds with a season. The day change runs at each real midnight whilemodify-daynight-lengthormodify-weather-cycleis on. /ms reloadapplies a new time zone, but going back tosystemneeds a restart.
Clock
| Option | Default | What it does |
|---|---|---|
time.format |
$hours$:$minutes$ |
Clock text of the time placeholders and /ms getinfo. $hours$, $minutes$ and $seconds$ become two-digit numbers. |
time.12-hour-clock.enabled |
false |
Writes $hours$ as 1 to 12 (12 at midnight and noon). The hours placeholders and the TimeRange condition keep 0 to 23. |
time.12-hour-clock.add-am-pm |
false |
Adds a space and AM or PM while the 12-hour clock is on. |
Week days
| Option | Default | What it does |
|---|---|---|
week-days |
Monday to Sunday |
Weekday names in order, at least one. Each day moves to the next name and the list wraps around. Weekly events (schedule.day) and the Weekday condition use these names, ignoring case. |
Worlds
| Option | Default | What it does |
|---|---|---|
synced-worlds |
none |
Worlds that share one clock and date: every second they all get the highest time among them and the date of the one furthest ahead. Only worlds with a season take part, and at least two are needed. |
worlds-without-events |
none |
Worlds where events never run their start and stop lines. Names are not case-sensitive. |
noneis a placeholder and is ignored.- A world moved forward to another world's date goes through a normal date change.
- With
on-new-world-creation.sync-with-other-worldsin config.yml, worlds created or loaded after startup (not Nether or End) joinsynced-worldsand get the season of today's real date. - Events still count as active in
worlds-without-eventsworlds, unlike an event's owndisabled-worlds. See Per-world control.
Season start dates
Every season in season-cycle of config.yml needs a line <season id>-start: <Month> <day>, custom seasons too. Write the month exactly as under months (case counts, spaces are fine), with no year.
| Option | Default | What it does |
|---|---|---|
winter-start |
December 4 |
First day of winter. |
spring-start |
March 4 |
First day of spring. |
summer-start |
June 4 |
First day of summer. |
fall-start |
September 4 |
First day of fall. |
- A season lasts until the day before the next start date, so the dates must follow the order of
season-cycle. Do not give two seasons the same date. The day is not checked against the month length. - A season without a start line is never reached.
- An unknown month name, a day that is not a whole number or a value without a space stops MythicSeasons from starting, or makes
/ms reloadfail.
Months
| Option | Default | What it does |
|---|---|---|
months.<name> |
the twelve real months | The months in order, any names without dots. A month's position is its number in placeholders, event schedules, the Month condition and saved dates. |
months.<name>.days |
see below | Days in the month, a whole number of 1 or more. Ignored for the first twelve months in synced mode. |
months.<name>.day-length-in-min |
see below | Real minutes of daylight (world time 0 to 11999) while modify-daynight-length is on and synced mode is off. 0 or missing logs Day/night length can't be 0! and runs that half at vanilla speed. |
months.<name>.night-length-in-min |
see below | Real minutes of night (world time 12000 to 23999). Same rules. |
| Month | days |
day-length-in-min |
night-length-in-min |
|---|---|---|---|
| January | 31 | 7 | 13 |
| February | 28 | 8 | 12 |
| March | 31 | 9 | 11 |
| April | 30 | 10 | 10 |
| May | 31 | 11 | 9 |
| June | 30 | 12 | 8 |
| July | 31 | 13 | 7 |
| August | 31 | 12 | 8 |
| September | 30 | 11 | 9 |
| October | 31 | 10 | 10 |
| November | 30 | 9 | 11 |
| December | 31 | 8 | 12 |
Dates are saved by month number. After you remove or reorder months, fix each world's date with /ms setdate: a saved month above the new count breaks that world's time handling.
The date
Each world with a season keeps its own date, saved in data.yml every performance.autosave-interval-minutes.
A world can get a season without a date, from on-new-world-creation or from /ms set with the calendar or sub-seasons off. Until /ms setdate, /ms nextseason, a restart or a counted day gives it one, it has no active event and, with modify-daynight-length on, its time stands still. While the calendar and sub-seasons are on, /ms set fails with an error there, so give it a date first. The first date is not a date change, so no event starts or stops.
How the date advances
- By default, one day each time the world clock passes 18000 (midnight). Setting the clock back from before 18000 (sleeping,
/time set) counts a day too. - With
calendar-is-real-life-days, at each real midnight. In synced mode it is always the real date. /ms setdate,/ms nextseasonand/ms setmove it by command.- In
synced-worlds, a world that is behind takes the date of the one furthest ahead.
The year goes up after the last day of the last month. Years start at 0, or are the real year in synced mode.
What a date change does
- With
automatic-season-cyclingon, the world takes the season of the new date. - Events start and stop as their schedule type says.
- Where temperature is on, the world picks a new base temperature.
With automatic-season-cycling on, the season follows the date within a second, so a season set by command flips back unless the date moved with it. /ms nextseason always moves the date, /ms set only while sub-seasons are on.
The clock
- While
modify-daynight-lengthis on, the plugin runs the clock of every world with a season at the month's day and night lengths, with the daylight cycle game rule off. The minutes are real minutes only at 20 ticks per second. - The clock text stretches with the month: sunrise reads about
07:48in January and04:12in July. - At night or in a storm, enough sleeping players (the players sleeping percentage game rule, rounded down, at least one) set the time to 0 and start clear weather for
clear-weather-min-durationtoclear-weather-max-durationof config.yml. /ms pausetimepauses a world's clock, in overworld-type worlds only. With a season andmodify-daynight-lengthon, that also stops the date and sleeping and is saved. Elsewhere it switches the daylight cycle game rule.
Commands
All need mythicseasons.admin, except /ms getinfo (mythicseasons.getinfo, everyone). See Commands and Permissions for the rest.
| Command | What it does |
|---|---|
/ms setdate <date> [world] |
Sets the date as dd/mm/yyyy (mm/dd/yyyy with american-date-format). A month above the month count is refused, and a day or month of 0 is ignored without a message. The day is not checked against the month length. |
/ms nextseason [world] |
Moves to the next season in season-cycle and sets the date to its start date, next year if that day has passed. |
/ms set <season> [world] |
Sets the season. With the calendar and sub-seasons on, the date moves to the middle of that season. |
/ms pausetime [world] |
Pauses or resumes the clock, see The clock. |
/ms getinfo [world] |
Season, date, days to the next season, time, active events and the next event. |
/ms setdate works in any world. In a world without a season that has a stored date (for example after /ms disable), it gives the world the season of the new date while automatic-season-cycling is on.
Placeholders
| PlaceholderAPI | MythicMobs | Value |
|---|---|---|
%ms_day% |
<mythicseasons.day> |
Day of the month |
%ms_month% |
<mythicseasons.month> |
Month number |
%ms_month_asname% |
<mythicseasons.month.name> |
Month name from months |
%ms_year% |
<mythicseasons.year> |
Year |
%ms_weekday% |
<mythicseasons.weekday> |
Weekday name from week-days |
%ms_time% |
<mythicseasons.time> |
Clock text from time.format |
%ms_hours% |
<mythicseasons.hours> |
Hour, 0 to 23 |
%ms_minutes% |
<mythicseasons.minutes> |
Minute, 0 to 59 |
Without a date or with the calendar off, the date placeholders show 0 for numbers and none for names. Full lists: Placeholders and PlaceholderAPI.
Console messages
| Message | Meaning |
|---|---|
calendar.yml could not be read: <reason> |
YAML syntax error, see the caution at the top. |
calendar.yml defines no months; the calendar is disabled. |
months is missing or empty. |
calendar.yml has no '<id>-start' entry, ... |
A season in season-cycle has no start line. |
Could not find month in: <value> as season start |
A start line names a month not under months. MythicSeasons does not start. |
Invalid timezone '<id>' in calendar.yml. Falling back to system timezone. |
time-sync-timezone is not a known time zone ID. |
Day/night length can't be 0! |
A month's day-length-in-min or night-length-in-min is 0 or missing. |
Examples
sync-time-with-real-world: true
time-sync-timezone: 'Europe/London'
time:
format: '$hours$:$minutes$'
12-hour-clock:
enabled: true
add-am-pm: true
The sky and the date follow the clock in London, and the time placeholders read like
03:45 PM.
synced-worlds:
- world
- world_resource
worlds-without-events:
- world_resource
Both worlds share one clock and date, and events run their lines only in
world.
months:
Thaw: {days: 20, day-length-in-min: 10, night-length-in-min: 10}
Highsun: {days: 20, day-length-in-min: 13, night-length-in-min: 7}
Harvest: {days: 20, day-length-in-min: 10, night-length-in-min: 10}
Frost: {days: 20, day-length-in-min: 7, night-length-in-min: 13}
spring-start: Thaw 1
summer-start: Highsun 1
fall-start: Harvest 1
winter-start: Frost 1
An 80-day year with one 20-day month per season. Event files for this calendar use month numbers 1 to 4.