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)
          Deprecated. Magic value
Lever(int type, byte data)
          Deprecated. Magic value
Lever(Material type)
           
Lever(Material type, byte data)
          Deprecated. Magic value
 
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

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


Lever

public Lever(Material type)

Lever

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


Lever

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

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 © 2014. All rights reserved.