Commands:
/HOURS SET open [HH:MM]
operationhours.set.open
Sets the hour the server opens. See localization notes below.
/HOURS SET close [HH:MM]
operationhours.set.close
Sets the hour the server closes. See localization notes below.
/HOURS SET range [HH:MM] [HH:MM]
operationhours.set.open
operationhours.set.close
Sets the open to close range for the server. Just made by laziness as I got tired of typing two full commands to set open and close separately lol. See localization notes below.
/HOURS SET closing-threshold [#]
operationhours.set.threshold
Set the amount of time to disallow logins prior to closing. Use zero to disable feature.
/HOURS SET warning [#]
operationhours.set.warning
Set the amount of time to start sending warning messages to players prior to closing. Use zero to disable feature.
/HOURS SET weekday [MM/DD/YYYY]
operationhours.set.weekday
Toggle server open status for the specified weekday.
/HOURS SET holiday [MM/DD/YYYY]
operationhours.set.holiday
Toggle server open status for the specified date. You can enter either MM/DD for something that occurs every year, or MM/DD/YYYY for a specific date.
/HOURS FORCE [normal | open | close]
operationhours.force.(setting)
If set to open or close, it will disregard the schedule and be always open or closed. Use normal to resume normal operations.
/HOURS PERIOD _CREATE name HH:MM HH:MM
operationhours.period.create
Create a new period
/HOURS PERIOD name
DELETE
operationhours.period.delete
Delete a period
/HOURS PERIOD name
START
operationhours.period.start.view
View the start time for the period
/HOURS PERIOD name
START [HH:MM]
operationhours.period.start.edit
Set the start time for the period
/HOURS PERIOD name
END
operationhours.period.end.view
View the end time for the period
/HOURS PERIOD name
END [HH:MM]
operationhours.period.end.edit
Set the end time for the period
/HOURS PERIOD name
PERM
operationhours.period.perm.view
View the permission requirement setting
/HOURS PERIOD name
PERM [true | false]
operationhours.period.perm.edit
Set the permission requirement setting
/HOURS PERIOD name
WHITELIST
operationhours.period.whitelist.view
View the whitelist
/HOURS PERIOD name
WHITELIST [player]
operationhours.period.edit
Edit the whitelist to toggle a player
/HOURS PERIOD name
BLACKLIST
operationhours.period.blacklist.view
View the blacklist
/HOURS PERIOD name
BLACKLIST [player]
operationhours.period.blacklist.edit
Edit the blacklist to toggle a player
/HOURS RELOAD
operationhours.reload
Reload config from disk
Localization Notes:
I originally wanted it to be a lot more flexible with localizing dates and times, but it become a big headache. As such, for now you need to enter times in the format of HH:MM military style. It MUST be HH, if you do 8:00 it will not work. Same with dates; you need to use MM/DD or MM/DD/YYYY and you must include leading zeros. So 1/1/2023 is not valid but 01/01/2023 is. Yes, I know it's a PITA and I will be fixing that later
Days can be localized. In the config, you set the days in localization.weekdays. The keys must remain fixed; i.e. the mon, tue, etc should not be changed. Just change the value for the appropriate day. So if you are German, you would put "mon: Montag". Be aware that if you change the localization of weekdays, you must be sure the weekdays the server is open reflect that. So in open.days if you have "Monday" after changing mon to Montag, it will not work. I have date and time localization for output (not input yet) but it doesn't seem to work at the moment (sigh). I'll fix that in a later version as well.
Also I have a token for pluralizing minutes, %s%. If time left is 1 minute, it tokenizes to nothing otherwise it's S so you can do minute%s% in a message. That would result in messages like "Closing in 5 minutes" or "Closing in 1 minute". In retrospect, again with the localization headaches, I should just do a value for single and plural minute rather than just s because not all languages will benefit from the swappable S. I'll put it on the ever growing list of things to update lol.
Messaging Notes:
There are some tokens you can use in messaging. I don't tokenize all strings, so like if you put %opentime% in access-denied, it won't do anything. But several of them do support it. The tokens are:
%opentime%: The time the server opens
%openday%: The next day the server opens
%opendate%: The next date the server opens
%closetime%: The time the server closes
%minutes%: Minutes remaining until close
%s%: This is used for pluralizing, see the localization notes above
%openmsg%: Contents of the openmsg message
Miscellaneous:
If a user has operationhours.exempt, they will not be subject to the hours.