Hey,
I'm wanting to restore a player's health to full when they sleep in a bed at night. Specifically, only when they ACTUALLY sleep do I want to restore their health.
It looks like the event PlayerSleepInBedEvent is what I'm looking for and there's a getResultStatus() function tied to the event.. but it always seems to be null in my case.
The reason it's null, I assume, is because the event is fired when the player tries to sleep in the bed. So, since it's fired before sleeping actually happens.. when would I want to check the result? If the player clicks leave bed or similar, that's still premature.
Thanks for any and all help,
Mythics