Calendar
Calendar is a plugin that allow you to create a time structure to each of your worlds. Create months and days in a week for each world and control the day cycle of each one.
Commands
/calendar - Display the time of the world you are in.
/cld - Display the time of the world you are in.
/calendar setTime [tick] - Set the time of the world without resetting the calendar.
/calendar file calendar setFormat [format] - Set the format of the file. JSON, HOCON or YAML
How it works
Each world has its own time structure. That means, you can control the year, the number of month in a year, the number of week in each month, the days in a week and the day/night cycle. The day cycle is in tick, a normal minecraft day is 24000 ticks.
To see the time on each world, you can format the time value. You can format how the time is displayed and the style of the text.
Formats
- Time
-
%yy
: Get the year in this format. 01, 02, 03, … 10, 11, 12 … 100, 101, 102 -
%MM
: Get the month in this format. 01, 02, 03, … 10, 11, 12 -
%WW
: Get the week in this format. 01, 02, 03, … 10, 11, 12 -
%dd
: Get the day in month in this format. 01, 02, 03, … 10, 11, 12 -
%HH
: Get the hour in this format. 01, 02, 03, … 10, 11, 12 -
%mm
: Get the minute in this format. 01, 02, 03, … 10, 11, 12 -
%ss
: Get the second in this format. 01, 02, 03, … 10, 11, 12 -
%y
: Get the year in this format. 1, 2, 3, … 10, 11, 12 -
%M
: Get the month in this format. 1, 2, 3, … 10, 11, 12 -
%G
: Get the name of the month. -
%W
: Get the week in this format. 1, 2, 3, … 10, 11, 12 -
%E
: Get the name of the day. -
%d
: Get the day in month in this format. 1, 2, 3, … 10, 11, 12 -
%H
: Get the hour in this format. 1, 2, 3, … 10, 11, 12 -
%m
: Get the minute in this format. 1, 2, 3, … 10, 11, 12 -
%s
: Get the second in this format. 1, 2, 3, … 10, 11, 12 - Color and text style
- Go on this website to get the codes.
Events
The events are important with Calendar, because you can display time automatically with them. To handle an event, you have to set the format of the time in the formats like below.
- Events:
-
time
: When the player do /cld or /calendar. If not defined in the config, there is a default value. -
second
: When the second change. -
minute
: When the minute change. -
hour
: When the hour change. -
day
: When the day change. -
week
: When the week change. -
month
: When the month change. -
year
: When the year change.
This is an example in the config file.
{
"formats": {
"time": "&a[Calendar] &c%yy/%MM/%dd %HH:%mm &a- &c%d %G %y",
"minute": "&a[Calendar] New minute! &c%yy/%MM/%dd %HH:%mm",
"hour": "&a[Calendar] New hour! &c%yy/%MM/%dd %HH:%mm",
"day": "&a[Calendar] New day! &c%yy/%MM/%dd %HH:%mm",
"week": "&a[Calendar] New week! &c%yy/%MM/%dd %HH:%mm",
"month": "&a[Calendar] New month! &c%yy/%MM/%dd %HH:%mm",
"year": "&a[Calendar] New year! &c%yy/%MM/%dd %HH:%mm"
},
"worlds": {
"world" <--(World name): {
"dayCycle": 2400, <--(day cycle 10x faster than normal minecraft day)
"nightCycle": 1200,<--(night cycle 2x faster than day cycle)
"startYear": -200, <--(If the world time is 0, the year will be this one)
"days": [ <--(days in a week)
"Monday", <--(name of the first day)
"Wednesday",
"Friday",
"Sunday"
],
"months": [ <--(months in a year)
{
"weeks": 2, <--(number of week in this month)
"name": "December" <--(name of the month)
},
{
"weeks": 1,
"name": "June"
}
]
}
}
}
Config example
This config set a calendar for the worlds named world
and nether
and with three formats: when commands are called, when hour change and when the day change.
{
"formats": {
"time": "&f[&6Calendar&f] &c%yy/%MM/%dd %HH:%mm:%ss &a- &c%d %G %y",
"hour": "&f[&6Calendar&f] &c%yy/%MM/%dd %HH:%mm:%ss &a- &c%d %G %y"
},
"worlds": {
"world": {
"dayCycle": 800,
"nightCycle": 400,
"startYear": -200,
"days": [
"Monday",
"Wednesday",
"Friday",
"Sunday"
],
"months": [
{
"weeks": 2,
"name": "June"
},
{
"weeks": 1,
"name": "September"
},
{
"weeks": 2,
"name": "December"
},
{
"weeks": 1,
"name": "March"
}
]
},
"nether": {
"dayCycle": 600,
"nightCycle": 200,
"startYear": 0,
"days": [
"Friday"
],
"months": [
{
"weeks": 1,
"name": "October"
}
]
}
}
}