Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.material.Skull Class Reference
Inheritance diagram for org.bukkit.material.Skull:
org.bukkit.material.MaterialData org.bukkit.material.Directional

Public Member Functions

 Skull (BlockFace direction)
 
 Skull (final int type)
 
 Skull (final Material type)
 
 Skull (final int type, final byte data)
 
 Skull (final Material type, final byte data)
 
void setFacingDirection (BlockFace face)
 
BlockFace getFacing ()
 
String toString ()
 
Skull 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 ()
 
void setData (byte data)
 
Material getItemType ()
 
int getItemTypeId ()
 
ItemStack toItemStack ()
 
ItemStack toItemStack (int amount)
 
String toString ()
 
int hashCode ()
 
boolean equals (Object obj)
 
MaterialData clone ()
 

Detailed Description

Represents a skull.

Definition at line 9 of file material/Skull.java.

Constructor & Destructor Documentation

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

Instantiate a skull facing in a particular direction.

Parameters
directionthe direction the skull's face is facing

Definition at line 19 of file material/Skull.java.

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

19  {
20  this();
21  setFacingDirection(direction);
22  }
void setFacingDirection(BlockFace face)
org.bukkit.material.Skull.Skull ( final int  type)
Deprecated:
Magic value

Definition at line 29 of file material/Skull.java.

29  {
30  super(type);
31  }
org.bukkit.material.Skull.Skull ( final int  type,
final byte  data 
)
Deprecated:
Magic value

Definition at line 42 of file material/Skull.java.

42  {
43  super(type, data);
44  }
org.bukkit.material.Skull.Skull ( final Material  type,
final byte  data 
)
Deprecated:
Magic value

Definition at line 51 of file material/Skull.java.

51  {
52  super(type, data);
53  }

Member Function Documentation

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

Gets the direction this block is facing

Returns
the direction this block is facing

Implements org.bukkit.material.Directional.

Definition at line 83 of file material/Skull.java.

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

83  {
84  int data = getData();
85 
86  switch (data) {
87  case 0x1:
88  default:
89  return BlockFace.SELF;
90 
91  case 0x2:
92  return BlockFace.NORTH;
93 
94  case 0x3:
95  return BlockFace.SOUTH;
96 
97  case 0x4:
98  return BlockFace.EAST;
99 
100  case 0x5:
101  return BlockFace.WEST;
102  }
103  }
void org.bukkit.material.Skull.setFacingDirection ( BlockFace  face)

Sets the direction that this block is facing in

Parameters
faceThe facing direction

Implements org.bukkit.material.Directional.

Definition at line 55 of file material/Skull.java.

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

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

55  {
56  int data;
57 
58  switch (face) {
59  case SELF:
60  default:
61  data = 0x1;
62  break;
63 
64  case NORTH:
65  data = 0x2;
66  break;
67 
68  case EAST:
69  data = 0x4;
70  break;
71 
72  case SOUTH:
73  data = 0x3;
74  break;
75 
76  case WEST:
77  data = 0x5;
78  }
79 
80  setData((byte) data);
81  }

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