Hooking into Calendar

Events

Calendar has two events for developers to use, NewDayEvent and HolidayEvent.

NewDayEvent

This event is called whenever a new day passes.

Methods:

  • getDay() : returns the day of the month.
  • getDayName() : returns the name of the day(day of the week).
  • getTotalDays(): returns the amount total amount of days the server has been played.
HolidayEvent

This event is called whenever a holiday passes, as defined in the config

Methods:

  • getName() : returns the name of the holiday.
  • getMessage() : returns the message that the holiday announces.
  • getDay() : returns the day which this holiday happened.
  • getMonth() : if the holiday includes a month, then it returns the month of the holiday. If there is no month then this returns -1.
  • getYear() : if the holiday includes a year, then it returns the year. If not, then it returns -1.

Comments

Posts Quoted:
Reply
Clear All Quotes