Description
Any player logging in outside of opening hours gets a clear message stating the opening hours and is denied access.
Players logged in at closing time get a warning that the server will close down beforehand and are
disconnected from the server at closing time with a message explaining this.
- The opening hours are specified in the configuration file.
- All messages can be set and localized in the configuration file.
![]()
Installation
As usual: put the OpeningHours.jar in the plugins directory.
Command
/openinghours displays opening hours per weekday.
Permissions
permission 'openinghours.ignore' allows a user to login outside (and inside) of opening hours.
permission 'openinghours.openinghours' allows a user execute the /openinghours command to display opening hours per weekday.
Configuration
The plugin is configured via the file plugins/OpeningHours/config.yml. The first time the plugin runs it creates an example configuration file.
Example config.yml:
#Times are specified between quotes in 24 or 12 hours format.
#Spaces are ignored in times, so spaces can be added for aesthetics when used in the messages below.
#e.g. '06:00', '06:00 AM', '06:00AM', '14:00', '02:00 PM', '02:00PM'
serverOpeningTime: '09:00'
serverClosingTime: '19:00'
#override the opening times above for the days & times mentioned below (all weekdays -lower-case- are recognized):
- friday
: - serverClosingTime: '23:00'
- saturday
: - serverOpeningTime: '01:00'
serverClosingTime: '23:00' - sunday
: - serverOpeningTime: '01:00'
#Show messages:warnBeforeClose this many seconds before serverClosingTime:
warnSecondsBeforeClose: 60
#specify (comma separated) the players who should be able to login outside of opening hours
#note that permission "openinghours.ignore" does the same
ignoreFor: tarzan, jane, douglas
#messages can use parameters %serverOpeningTime%, %serverClosingTime%,
#%warnSecondsBeforeClose% and "\n" for a line feed.
- messages
: - serverClosed: 'This server is currently closed.\n\nOpening hours from %serverOpeningTime% to %serverClosingTime%.'
warnBeforeClose: 'This server closes in %warnSecondsBeforeClose% seconds.'
kickPlayer: 'Everybody is kicked because this server is currently closed.\n\nOpening hours from %serverOpeningTime% to %serverClosingTime%.'
errorOpenNotAfterClose: 'Opening time should be before closing time. Plugin disabled.'
OpeningHours Logo by WishesXD



