Posted March 7, 20178 yr 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
March 7, 20178 yr You could use the PlayerWakeUpEvent to detect when a player wakes up from sleeping. Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.