Package org.bukkit.material
Class TrapDoor
java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.SimpleAttachableMaterialData
org.bukkit.material.TrapDoor
- All Implemented Interfaces:
java.lang.Cloneable,Attachable,Directional,Openable
public class TrapDoor extends SimpleAttachableMaterialData implements Openable
Represents a trap door
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description TrapDoorclone()BlockFacegetAttachedFace()Gets the face that this block is attached onbooleanisInverted()Test if trapdoor is invertedbooleanisOpen()Check to see if the door is open.voidsetFacingDirection(BlockFace face)Sets the direction that this block is facing invoidsetInverted(boolean inv)Set trapdoor inverted statevoidsetOpen(boolean isOpen)Configure this door to be either open or closed;java.lang.StringtoString()Methods inherited from class org.bukkit.material.MaterialData
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
-
Constructor Details
-
TrapDoor
public TrapDoor() -
TrapDoor
@Deprecated public TrapDoor(int type)Deprecated.Magic value- Parameters:
type- the raw type id
-
TrapDoor
-
TrapDoor
@Deprecated public TrapDoor(int type, byte data)Deprecated.Magic value- Parameters:
type- the raw type iddata- the raw data value
-
TrapDoor
Deprecated.Magic value- Parameters:
type- the typedata- the raw data value
-
-
Method Details
-
isOpen
public boolean isOpen()Description copied from interface:OpenableCheck to see if the door is open. -
setOpen
public void setOpen(boolean isOpen)Description copied from interface:OpenableConfigure this door to be either open or closed; -
isInverted
public boolean isInverted()Test if trapdoor is inverted- Returns:
- true if inverted (top half), false if normal (bottom half)
-
setInverted
public void setInverted(boolean inv)Set trapdoor inverted state- Parameters:
inv- - true if inverted (top half), false if normal (bottom half)
-
getAttachedFace
Description copied from interface:AttachableGets the face that this block is attached on- Specified by:
getAttachedFacein interfaceAttachable- Returns:
- BlockFace attached to
-
setFacingDirection
Description copied from interface:DirectionalSets the direction that this block is facing in- Specified by:
setFacingDirectionin interfaceDirectional- Parameters:
face- The facing direction
-
toString
public java.lang.String toString()- Overrides:
toStringin classSimpleAttachableMaterialData
-
clone
- Overrides:
clonein classSimpleAttachableMaterialData
-