Class Button

All Implemented Interfaces:
Cloneable, Attachable, Directional, Redstone

@Deprecated(forRemoval=true, since="1.13") public class Button 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 button
  • Constructor Summary

    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.
     
    Button(Material type, byte data)
    Deprecated.
    Magic value
  • Method Summary

    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 button is pointing toward
    void
    setPowered(boolean bool)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the current state of this button
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class org.bukkit.material.SimpleAttachableMaterialData

    getFacing

    Methods inherited from class org.bukkit.material.MaterialData

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

    Methods inherited from class java.lang.Object

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

    • Button

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

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

      @Deprecated public Button(Material type, byte data)
      Deprecated.
      Magic value
      Parameters:
      type - the type
      data - the raw data value
  • Method Details

    • isPowered

      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

      public void setPowered(boolean bool)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the current state of this button
      Parameters:
      bool - whether or not the button is powered
    • getAttachedFace

      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

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

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

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