Package org.bukkit.material
Class TripwireHook
java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.SimpleAttachableMaterialData
org.bukkit.material.TripwireHook
- All Implemented Interfaces:
java.lang.Cloneable,Attachable,Directional,Redstone
public class TripwireHook extends SimpleAttachableMaterialData implements Redstone
Represents the tripwire hook
-
Constructor Summary
Constructors Constructor Description TripwireHook()TripwireHook(int type)Deprecated.Magic valueTripwireHook(int type, byte data)Deprecated.Magic valueTripwireHook(BlockFace dir) -
Method Summary
Modifier and Type Method Description TripwireHookclone()BlockFacegetAttachedFace()Gets the face that this block is attached onbooleanisActivated()Test if hook is currently activatedbooleanisConnected()Test if tripwire is connectedbooleanisPowered()Gets the current state of this Material, indicating if it's powered or unpoweredvoidsetActivated(boolean act)Set hook activated statevoidsetConnected(boolean connected)Set tripwire connection statevoidsetFacingDirection(BlockFace face)Sets the direction that this block is facing injava.lang.StringtoString()Methods inherited from class org.bukkit.material.MaterialData
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
-
Constructor Details
-
TripwireHook
public TripwireHook() -
TripwireHook
@Deprecated public TripwireHook(int type)Deprecated.Magic value- Parameters:
type- the raw type id
-
TripwireHook
@Deprecated public TripwireHook(int type, byte data)Deprecated.Magic value- Parameters:
type- the raw type iddata- the raw data value
-
TripwireHook
-
-
Method Details
-
isConnected
public boolean isConnected()Test if tripwire is connected- Returns:
- true if connected, false if not
-
setConnected
public void setConnected(boolean connected)Set tripwire connection state- Parameters:
connected- - true if connected, false if not
-
isActivated
public boolean isActivated()Test if hook is currently activated- Returns:
- true if activated, false if not
-
setActivated
public void setActivated(boolean act)Set hook activated state- Parameters:
act- - true if activated, false if not
-
setFacingDirection
Description copied from interface:DirectionalSets the direction that this block is facing in- Specified by:
setFacingDirectionin interfaceDirectional- Parameters:
face- The facing direction
-
getAttachedFace
Description copied from interface:AttachableGets the face that this block is attached on- Specified by:
getAttachedFacein interfaceAttachable- Returns:
- BlockFace attached to
-
isPowered
public boolean isPowered()Description copied from interface:RedstoneGets the current state of this Material, indicating if it's powered or unpowered -
clone
- Overrides:
clonein classSimpleAttachableMaterialData
-
toString
public java.lang.String toString()- Overrides:
toStringin classSimpleAttachableMaterialData
-