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

Public Member Functions

 Ladder (final int type)
 
 Ladder (final Material type)
 
 Ladder (final int type, final byte data)
 
 Ladder (final Material type, final byte data)
 
BlockFace getAttachedFace ()
 
void setFacingDirection (BlockFace face)
 
Ladder clone ()
 
- Public Member Functions inherited from org.bukkit.material.SimpleAttachableMaterialData
 SimpleAttachableMaterialData (int type)
 
 SimpleAttachableMaterialData (int type, BlockFace direction)
 
 SimpleAttachableMaterialData (Material type, BlockFace direction)
 
 SimpleAttachableMaterialData (Material type)
 
 SimpleAttachableMaterialData (int type, byte data)
 
 SimpleAttachableMaterialData (Material type, byte data)
 
BlockFace getFacing ()
 
String toString ()
 
SimpleAttachableMaterialData 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 Ladder data

Definition at line 9 of file Ladder.java.

Constructor & Destructor Documentation

org.bukkit.material.Ladder.Ladder ( final int  type)
Deprecated:
Magic value

Definition at line 19 of file Ladder.java.

19  {
20  super(type);
21  }
org.bukkit.material.Ladder.Ladder ( final int  type,
final byte  data 
)
Deprecated:
Magic value

Definition at line 32 of file Ladder.java.

32  {
33  super(type, data);
34  }
org.bukkit.material.Ladder.Ladder ( final Material  type,
final byte  data 
)
Deprecated:
Magic value

Definition at line 41 of file Ladder.java.

41  {
42  super(type, data);
43  }

Member Function Documentation

BlockFace org.bukkit.material.Ladder.getAttachedFace ( )

Gets the face that this block is attached on

Returns
BlockFace attached to

Implements org.bukkit.material.Attachable.

Definition at line 50 of file Ladder.java.

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

50  {
51  byte data = getData();
52 
53  switch (data) {
54  case 0x2:
55  return BlockFace.SOUTH;
56 
57  case 0x3:
58  return BlockFace.NORTH;
59 
60  case 0x4:
61  return BlockFace.EAST;
62 
63  case 0x5:
64  return BlockFace.WEST;
65  }
66 
67  return null;
68  }
void org.bukkit.material.Ladder.setFacingDirection ( BlockFace  face)

Sets the direction this ladder is facing

Implements org.bukkit.material.Directional.

Definition at line 73 of file Ladder.java.

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

73  {
74  byte data = (byte) 0x0;
75 
76  switch (face) {
77  case SOUTH:
78  data = 0x2;
79  break;
80 
81  case NORTH:
82  data = 0x3;
83  break;
84 
85  case EAST:
86  data = 0x4;
87  break;
88 
89  case WEST:
90  data = 0x5;
91  break;
92  }
93 
94  setData(data);
95 
96  }

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