Preventing Players From Entering a Bed

Discussion in 'Plugin Development' started by Intelli, Mar 23, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Intelli

    Hey everyone,

    Is it possible to prevent a player from entering a bed?
    If so, can someone point me in the right direction for this? =]

    Thanks!
     
  2. Offline

    ZackScott

    I second this. Is there a way to prevent sleeping that changes the time?
     
  3. Offline

    ZNickq

    cancel onPlayerInteract?
     
  4. Offline

    Father Of Time

    Here you go, this should help:
    org.bukkit.event.player.PlayerBedEnterEvent
    http://jd.bukkit.org/doxygen/de/db3/classorg_1_1bukkit_1_1event_1_1player_1_1PlayerBedEnterEvent.html

    Simply create an event listener for this event and cancel it, presto facto, no more bedtime!

    Hope this helps!
     
Thread Status:
Not open for further replies.

Share This Page