Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.material.Bed Class Reference

Represents a bed. More...

+ Inheritance diagram for org.bukkit.material.Bed:
+ Collaboration diagram for org.bukkit.material.Bed:

Public Member Functions

 Bed ()
 Default constructor for a bed.
 
 Bed (BlockFace direction)
 Instantiate a bed facing in a particular direction.
 
 Bed (final int type)
 
 Bed (final Material type)
 
 Bed (final int type, final byte data)
 
 Bed (final Material type, final byte data)
 
boolean isHeadOfBed ()
 Determine if this block represents the head of the bed.
 
void setHeadOfBed (boolean isHeadOfBed)
 Configure this to be either the head or the foot of the bed.
 
void setFacingDirection (BlockFace face)
 Set which direction the head of the bed is facing.
 
BlockFace getFacing ()
 Get the direction that this bed's head is facing toward.
 
String toString ()
 
Bed clone ()
 
- Public Member Functions inherited from org.bukkit.material.MaterialData
 MaterialData (final int type)
 
 MaterialData (final Material type)
 
 MaterialData (final int type, final byte data)
 
 MaterialData (final Material type, final byte data)
 
byte getData ()
 Gets the raw data in this material.
 
void setData (byte data)
 Sets the raw data of this material.
 
Material getItemType ()
 Gets the Material that this MaterialData represents.
 
int getItemTypeId ()
 Gets the Material Id that this MaterialData represents.
 
ItemStack toItemStack ()
 Creates a new ItemStack based on this MaterialData.
 
ItemStack toItemStack (int amount)
 Creates a new ItemStack based on this MaterialData.
 
String toString ()
 
int hashCode ()
 
boolean equals (Object obj)
 
MaterialData clone ()
 
- Public Member Functions inherited from org.bukkit.material.Directional
void setFacingDirection (BlockFace face)
 Sets the direction that this block is facing in.
 
BlockFace getFacing ()
 Gets the direction this block is facing.
 

Detailed Description

Represents a bed.

Definition at line 9 of file Bed.java.

Constructor & Destructor Documentation

org.bukkit.material.Bed.Bed ( )

Default constructor for a bed.

Definition at line 14 of file Bed.java.

References org.bukkit.Material.BED_BLOCK.

org.bukkit.material.Bed.Bed ( BlockFace  direction)

Instantiate a bed facing in a particular direction.

Parameters
directionthe direction the bed's head is facing

Definition at line 23 of file Bed.java.

References org.bukkit.material.Bed.setFacingDirection().

org.bukkit.material.Bed.Bed ( final int  type)

Definition at line 28 of file Bed.java.

org.bukkit.material.Bed.Bed ( final Material  type)

Definition at line 32 of file Bed.java.

org.bukkit.material.Bed.Bed ( final int  type,
final byte  data 
)

Definition at line 36 of file Bed.java.

org.bukkit.material.Bed.Bed ( final Material  type,
final byte  data 
)

Definition at line 40 of file Bed.java.

Member Function Documentation

Bed org.bukkit.material.Bed.clone ( )

Definition at line 124 of file Bed.java.

References org.bukkit.material.Bed.clone().

Referenced by org.bukkit.material.Bed.clone().

BlockFace org.bukkit.material.Bed.getFacing ( )

Get the direction that this bed's head is facing toward.

Returns
the direction the head of the bed is facing

Definition at line 99 of file Bed.java.

References org.bukkit.block.BlockFace.EAST, org.bukkit.material.MaterialData.getData(), org.bukkit.block.BlockFace.NORTH, org.bukkit.block.BlockFace.SOUTH, and org.bukkit.block.BlockFace.WEST.

Referenced by org.bukkit.material.Bed.toString().

boolean org.bukkit.material.Bed.isHeadOfBed ( )

Determine if this block represents the head of the bed.

Returns
true if this is the head of the bed, false if it is the foot

Definition at line 49 of file Bed.java.

References org.bukkit.material.MaterialData.getData().

Referenced by org.bukkit.material.Bed.setFacingDirection(), and org.bukkit.material.Bed.toString().

void org.bukkit.material.Bed.setFacingDirection ( BlockFace  face)

Set which direction the head of the bed is facing.

Note that this will only affect one of the two blocks the bed is made of.

Definition at line 66 of file Bed.java.

References org.bukkit.material.Bed.isHeadOfBed(), and org.bukkit.material.MaterialData.setData().

Referenced by org.bukkit.material.Bed.Bed().

void org.bukkit.material.Bed.setHeadOfBed ( boolean  isHeadOfBed)

Configure this to be either the head or the foot of the bed.

Parameters
isHeadOfBedTrue to make it the head.

Definition at line 58 of file Bed.java.

References org.bukkit.material.MaterialData.getData(), and org.bukkit.material.MaterialData.setData().

String org.bukkit.material.Bed.toString ( )

The documentation for this class was generated from the following file: