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 Buttonclone()BlockFacegetAttachedFace()Gets the face that this block is attached onbooleanisPowered()Gets the current state of this Material, indicating if it's powered or unpoweredvoidsetFacingDirection(BlockFace face)Sets the direction this button is pointing towardvoidsetPowered(boolean bool)Sets the current state of this buttonjava.lang.StringtoString()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:
getAttachedFacein interfaceAttachable- Returns:
- BlockFace attached to
-
setFacingDirection
Sets the direction this button is pointing toward- Specified by:
setFacingDirectionin interfaceDirectional- Parameters:
face- The facing direction
-
toString
public java.lang.String toString()- Overrides:
toStringin classSimpleAttachableMaterialData
-
clone
- Overrides:
clonein classSimpleAttachableMaterialData
-