PlayerBedLeaveEvent implements Cancellable

XMLWordPrintable

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Environment:

      api
      spigot-api-1.16.4-R0.1-SNAPSHOT

      server
      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.

            Assignee:
            Unassigned
            Reporter:
            lukas of lockless
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: