org.bukkit.material
Class Button

java.lang.Object
  extended by org.bukkit.material.MaterialData
      extended by org.bukkit.material.SimpleAttachableMaterialData
          extended by org.bukkit.material.Button
All Implemented Interfaces:
Cloneable, Attachable, Directional, Redstone

public class Button
extends SimpleAttachableMaterialData
implements Redstone

Represents a button


Constructor Summary
Button()
           
Button(int type)
          Deprecated. Magic value
Button(int type, byte data)
          Deprecated. Magic value
Button(Material type)
           
Button(Material type, byte data)
          Deprecated. Magic value
 
Method Summary
 Button 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 button is pointing toward
 void setPowered(boolean bool)
          Sets the current state of this button
 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

Button

public Button()

Button

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


Button

public Button(Material type)

Button

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


Button

@Deprecated
public Button(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 bool)
Sets the current state of this button

Parameters:
bool - whether or not the button is powered

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 button is pointing toward

Specified by:
setFacingDirection in interface Directional
Parameters:
face - The facing direction

toString

public String toString()
Overrides:
toString in class SimpleAttachableMaterialData

clone

public Button clone()
Overrides:
clone in class SimpleAttachableMaterialData


Copyright © 2014. All rights reserved.