org.bukkit.material
Class TripwireHook

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

public class TripwireHook
extends SimpleAttachableMaterialData
implements Redstone

Represents the tripwire hook


Constructor Summary
TripwireHook()
           
TripwireHook(BlockFace dir)
           
TripwireHook(int type)
          Deprecated. Magic value
TripwireHook(int type, byte data)
          Deprecated. Magic value
 
Method Summary
 TripwireHook clone()
           
 BlockFace getAttachedFace()
          Gets the face that this block is attached on
 boolean isActivated()
          Test if hook is currently activated
 boolean isConnected()
          Test if tripwire is connected
 boolean isPowered()
          Gets the current state of this Material, indicating if it's powered or unpowered
 void setActivated(boolean act)
          Set hook activated state
 void setConnected(boolean connected)
          Set tripwire connection state
 void setFacingDirection(BlockFace face)
          Sets the direction that this block is facing in
 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

TripwireHook

public TripwireHook()

TripwireHook

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


TripwireHook

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


TripwireHook

public TripwireHook(BlockFace dir)
Method Detail

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

public void setFacingDirection(BlockFace face)
Description copied from interface: Directional
Sets the direction that this block is facing in

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

getAttachedFace

public BlockFace getAttachedFace()
Description copied from interface: Attachable
Gets the face that this block is attached on

Specified by:
getAttachedFace in interface Attachable
Returns:
BlockFace attached to

isPowered

public boolean isPowered()
Description copied from interface: Redstone
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

clone

public TripwireHook clone()
Overrides:
clone in class SimpleAttachableMaterialData

toString

public String toString()
Overrides:
toString in class SimpleAttachableMaterialData


Copyright © 2014. All rights reserved.