org.bukkit.material
Class Lever

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

public class Lever
extends SimpleAttachableMaterialData
implements Redstone

Represents a lever


Constructor Summary
Lever()
           
Lever(int type)
           
Lever(int type, byte data)
           
Lever(Material type)
           
Lever(Material type, byte data)
           
 
Method Summary
 Lever clone()
           
 BlockFace getAttachedFace()
          Gets the face that this block is attached on
 boolean isPowered()
          Gets the current state of this Material, indicating if it's powered or unpowered
 void setFacingDirection(BlockFace face)
          Sets the direction this lever is pointing in
 void setPowered(boolean isPowered)
          Set this lever to be powered or not.
 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

Lever

public Lever()

Lever

public Lever(int type)

Lever

public Lever(Material type)

Lever

public Lever(int type,
             byte data)

Lever

public Lever(Material type,
             byte data)
Method Detail

isPowered

public boolean isPowered()
Gets the current state of this Material, indicating if it's powered or unpowered

Specified by:
isPowered in interface Redstone
Returns:
true if powered, otherwise false

setPowered

public void setPowered(boolean isPowered)
Set this lever to be powered or not.

Parameters:
isPowered - whether the lever should be powered or not

getAttachedFace

public BlockFace getAttachedFace()
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)
Sets the direction this lever is pointing in

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

toString

public String toString()
Overrides:
toString in class SimpleAttachableMaterialData

clone

public Lever clone()
Overrides:
clone in class SimpleAttachableMaterialData


Copyright © 2013. All Rights Reserved.