-
New Feature
-
Resolution: Fixed
-
Minor
-
None
-
None
-
api
spigot-api-1.16.4-R0.1-SNAPSHOTserver
paper-1.16.4-406
-
1.16.4
-
Yes
PlayerEntersBedEvent can be cancelled and has a very informative interface getBedEnterResult()
PlayerLeavesBedEvent on the other hand is lacking in those features.
imagine a plugin where players can enter a bed and not be immidiately thrown out of it using player.sleep(bed,true);//forces sleep
if the playerleaveevent had some more information on it with Event.Result, some cases could be caught and the players could sleep any the time.
im attaching a plugin to let those interested see what happens when a player enters a bed during the daytime. the plugin does system.out.println some information about the events.
i hope i didn't mess up following the guidelines or add this in the wrong place.