org.bukkit.material
Class TrapDoor

java.lang.Object
  extended by org.bukkit.material.MaterialData
      extended by org.bukkit.material.SimpleAttachableMaterialData
          extended by org.bukkit.material.TrapDoor
All Implemented Interfaces:
Cloneable, Attachable, Directional, Openable

public class TrapDoor
extends SimpleAttachableMaterialData
implements Openable

Represents a trap door


Constructor Summary
TrapDoor()
           
TrapDoor(int type)
          Deprecated. Magic value
TrapDoor(int type, byte data)
          Deprecated. Magic value
TrapDoor(Material type)
           
TrapDoor(Material type, byte data)
          Deprecated. Magic value
 
Method Summary
 TrapDoor clone()
           
 BlockFace getAttachedFace()
          Gets the face that this block is attached on
 boolean isInverted()
          Test if trapdoor is inverted
 boolean isOpen()
          Check to see if the door is open.
 void setFacingDirection(BlockFace face)
          Sets the direction that this block is facing in
 void setInverted(boolean inv)
          Set trapdoor inverted state
 void setOpen(boolean isOpen)
          Configure this door to be either open or closed;
 String toString()
           
 
Methods inherited from class org.bukkit.material.SimpleAttachableMaterialData
getFacing
 
Methods inherited from class org.bukkit.material.MaterialData
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TrapDoor

public TrapDoor()

TrapDoor

@Deprecated
public TrapDoor(int type)
Deprecated. Magic value


TrapDoor

public TrapDoor(Material type)

TrapDoor

@Deprecated
public TrapDoor(int type,
                           byte data)
Deprecated. Magic value


TrapDoor

@Deprecated
public TrapDoor(Material type,
                           byte data)
Deprecated. Magic value

Method Detail

isOpen

public boolean isOpen()
Description copied from interface: Openable
Check to see if the door is open.

Specified by:
isOpen in interface Openable
Returns:
true if the door has swung counterclockwise around its hinge.

setOpen

public void setOpen(boolean isOpen)
Description copied from interface: Openable
Configure this door to be either open or closed;

Specified by:
setOpen in interface Openable
Parameters:
isOpen - True to open the door.

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

public BlockFace getAttachedFace()
Description copied from interface: Attachable
Gets the face that this block is attached on

Specified by:
getAttachedFace in interface Attachable
Returns:
BlockFace attached to

setFacingDirection

public void setFacingDirection(BlockFace face)
Description copied from interface: Directional
Sets the direction that this block is facing in

Specified by:
setFacingDirection in interface Directional
Parameters:
face - The facing direction

toString

public String toString()
Overrides:
toString in class SimpleAttachableMaterialData

clone

public TrapDoor clone()
Overrides:
clone in class SimpleAttachableMaterialData


Copyright © 2013. All Rights Reserved.