Class Lever

All Implemented Interfaces:
Cloneable, Attachable, Directional, Redstone

@Deprecated(since="1.13", forRemoval=true) public class Lever extends SimpleAttachableMaterialData implements Redstone
Deprecated, for removal: This API element is subject to removal in a future version.
all usage of MaterialData is deprecated and subject to removal. Use BlockData.
Represents a lever
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Lever(Material type, byte data)
    Deprecated.
    Magic value
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the face that this block is attached on
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the current state of this Material, indicating if it's powered or unpowered
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the direction this lever is pointing in
    void
    setPowered(boolean isPowered)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set this lever to be powered or not.
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class org.bukkit.material.SimpleAttachableMaterialData Link icon

    getFacing

    Methods inherited from class org.bukkit.material.MaterialData Link icon

    equals, getData, getItemType, hashCode, setData, toItemStack, toItemStack

    Methods inherited from class java.lang.Object Link icon

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details Link icon

    • Lever Link icon

      public Lever()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • Lever Link icon

      public Lever(Material type)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • Lever Link icon

      @Deprecated(since="1.6.2") public Lever(Material type, byte data)
      Deprecated.
      Magic value
      Parameters:
      type - the type
      data - the raw data value
  • Method Details Link icon

    • isPowered Link icon

      public boolean isPowered()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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 Link icon

      public void setPowered(boolean isPowered)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set this lever to be powered or not.
      Parameters:
      isPowered - whether the lever should be powered or not
    • getAttachedFace Link icon

      public BlockFace getAttachedFace()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the face that this block is attached on
      Specified by:
      getAttachedFace in interface Attachable
      Returns:
      BlockFace attached to
    • setFacingDirection Link icon

      public void setFacingDirection(BlockFace face)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the direction this lever is pointing in
      Specified by:
      setFacingDirection in interface Directional
      Parameters:
      face - The facing direction
    • toString Link icon

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class SimpleAttachableMaterialData
    • clone Link icon

      public Lever clone()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      clone in class SimpleAttachableMaterialData