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)
           
Button(int type, byte data)
           
Button(Material type)
           
Button(Material type, byte data)
           
 
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

public Button(int type)

Button

public Button(Material type)

Button

public Button(int type,
              byte data)

Button

public Button(Material type,
              byte data)
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 © 2013. All Rights Reserved.