Link to sleepingtimecheck
This event is fired when checking if a sleeping player can continue to sleep at a specified time. If has a result which determines the action.
- Default, causes the Vanilla logic of
World::isDaytimeto be consulted.
- Allow, allows the player to continue sleeping regardless
- Deny is specifically ignored in this instance and does nothing.
Thus, this event allows you to keep the player sleeping, but it does not allow you to specifically stop them from sleeping.
Link to event-class
You will need to cast the event in the function header as this class:
You can, of course, also import the class before and use that name then.
Event interface extensions
Link to event-interface-extensions
SleepingTimeCheck Events implement the following interfaces and are able to call all of their methods/getters/setters as well: