Package org.bukkit.material
Class Button
java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.SimpleAttachableMaterialData
org.bukkit.material.Button
- All Implemented Interfaces:
java.lang.Cloneable
,Attachable
,Directional
,Redstone
public class Button extends SimpleAttachableMaterialData implements Redstone
Represents a button
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Button
clone()
BlockFace
getAttachedFace()
Gets the face that this block is attached onboolean
isPowered()
Gets the current state of this Material, indicating if it's powered or unpoweredvoid
setFacingDirection(BlockFace face)
Sets the direction this button is pointing towardvoid
setPowered(boolean bool)
Sets the current state of this buttonjava.lang.String
toString()
Methods inherited from class org.bukkit.material.MaterialData
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
-
Constructor Details
-
Button
public Button() -
Button
@Deprecated public Button(int type)Deprecated.Magic value- Parameters:
type
- the type
-
Button
-
Button
@Deprecated public Button(int type, byte data)Deprecated.Magic value- Parameters:
type
- the raw type iddata
- the raw data value
-
Button
Deprecated.Magic value- Parameters:
type
- the typedata
- the raw data value
-
-
Method Details
-
isPowered
public boolean isPowered()Gets the current state of this Material, indicating if it's powered or unpowered -
setPowered
public void setPowered(boolean bool)Sets the current state of this button- Parameters:
bool
- whether or not the button is powered
-
getAttachedFace
Gets the face that this block is attached on- Specified by:
getAttachedFace
in interfaceAttachable
- Returns:
- BlockFace attached to
-
setFacingDirection
Sets the direction this button is pointing toward- Specified by:
setFacingDirection
in interfaceDirectional
- Parameters:
face
- The facing direction
-
toString
public java.lang.String toString()- Overrides:
toString
in classSimpleAttachableMaterialData
-
clone
- Overrides:
clone
in classSimpleAttachableMaterialData
-