类 Button

所有已实现的接口:
Cloneable, Attachable, Directional, Redstone

@Deprecated(since="1.14.1") public class Button extends SimpleAttachableMaterialData implements Redstone
已过时。
所有 MaterialData 的用法均已弃用并可能被移除。 请使用 BlockData。
代表一个按钮。
  • 构造器详细资料

    • Button

      public Button()
      已过时。
    • Button

      public Button(Material type)
      已过时。
    • Button

      @Deprecated(since="1.6.2") public Button(Material type, byte data)
      已过时。
      魔法值
      参数:
      type - 类型
      data - 原始数据值
  • 方法详细资料

    • isPowered

      public boolean isPowered()
      已过时。
      获取此材质的当前状态,指示其是否被激活。
      指定者:
      isPowered 在接口中 Redstone
      返回:
      如果被激活则返回 true,否则返回 false

      原文:Gets the current state of this Material, indicating if it's powered or unpowered

    • setPowered

      public void setPowered(boolean bool)
      已过时。
      设置此按钮的当前状态。
      参数:
      bool - 按钮是否被激活

      原文:Sets the current state of this button

    • getAttachedFace

      public BlockFace getAttachedFace()
      已过时。
      获取此方块所附着的面。
      指定者:
      getAttachedFace 在接口中 Attachable
      返回:
      附着的 BlockFace

      原文:Gets the face that this block is attached on

    • setFacingDirection

      public void setFacingDirection(BlockFace face)
      已过时。
      设置此按钮指向的方向。

      原文:Sets the direction this button is pointing toward

      指定者:
      setFacingDirection 在接口中 Directional
      参数:
      face - 朝向
    • toString

      public String toString()
      已过时。
      覆盖:
      toString 在类中 SimpleAttachableMaterialData
    • clone

      public Button clone()
      已过时。
      覆盖:
      clone 在类中 SimpleAttachableMaterialData