001 package org.bukkit.event.player; 002 003 import org.bukkit.block.Block; 004 import org.bukkit.entity.Player; 005 import org.bukkit.event.HandlerList; 006 007 /** 008 * This event is fired when the player is leaving a bed. 009 */ 010 public class PlayerBedLeaveEvent extends PlayerEvent { 011 private static final HandlerList handlers = new HandlerList(); 012 private final Block bed; 013 014 public PlayerBedLeaveEvent(final Player who, final Block bed) { 015 super(who); 016 this.bed = bed; 017 } 018 019 /** 020 * Returns the bed block involved in this event. 021 * 022 * @return the bed block involved in this event 023 */ 024 public Block getBed() { 025 return bed; 026 } 027 028 @Override 029 public HandlerList getHandlers() { 030 return handlers; 031 } 032 033 public static HandlerList getHandlerList() { 034 return handlers; 035 } 036 }