Added bed events and methods.

This commit is contained in:
sk89q
2011-04-07 11:26:33 -07:00
parent 748447716b
commit ef5d72ec02
6 changed files with 136 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
package org.bukkit.event.player;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
/**
* This event is fired when the player is leaving a bed.
*
* @author sk89q
*/
public class PlayerBedLeaveEvent extends PlayerEvent {
private Block bed;
public PlayerBedLeaveEvent(Player who, Block bed) {
super(Type.PLAYER_BED_LEAVE, who);
this.bed = bed;
}
/**
* Returns the bed block.
*
* @return
*/
public Block getBed() {
return bed;
}
}