Package org.bukkit.material
Class Lever
java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.SimpleAttachableMaterialData
org.bukkit.material.Lever
- All Implemented Interfaces:
java.lang.Cloneable
,Attachable
,Directional
,Redstone
public class Lever extends SimpleAttachableMaterialData implements Redstone
Represents a lever
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Lever
clone()
BlockFace
getAttachedFace()
Gets the face that this block is attached onboolean
isPowered()
Gets the current state of this Material, indicating if it's powered or unpoweredvoid
setFacingDirection(BlockFace face)
Sets the direction this lever is pointing invoid
setPowered(boolean isPowered)
Set this lever to be powered or not.java.lang.String
toString()
Methods inherited from class org.bukkit.material.MaterialData
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
-
Constructor Details
-
Lever
public Lever() -
Lever
@Deprecated public Lever(int type)Deprecated.Magic value- Parameters:
type
- the raw type id
-
Lever
-
Lever
@Deprecated public Lever(int type, byte data)Deprecated.Magic value- Parameters:
type
- the raw type iddata
- the raw data value
-
Lever
Deprecated.Magic value- Parameters:
type
- the typedata
- the raw data value
-
-
Method Details
-
isPowered
public boolean isPowered()Gets the current state of this Material, indicating if it's powered or unpowered -
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
Gets the face that this block is attached on- Specified by:
getAttachedFace
in interfaceAttachable
- Returns:
- BlockFace attached to
-
setFacingDirection
Sets the direction this lever is pointing in- Specified by:
setFacingDirection
in interfaceDirectional
- Parameters:
face
- The facing direction
-
toString
public java.lang.String toString()- Overrides:
toString
in classSimpleAttachableMaterialData
-
clone
- Overrides:
clone
in classSimpleAttachableMaterialData
-