Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.material.Tripwire Class Reference
Inheritance diagram for org.bukkit.material.Tripwire:
org.bukkit.material.MaterialData

Public Member Functions

 Tripwire (final int type)
 
 Tripwire (final int type, final byte data)
 
boolean isActivated ()
 
void setActivated (boolean act)
 
boolean isObjectTriggering ()
 
void setObjectTriggering (boolean trig)
 
Tripwire clone ()
 
String toString ()
 
- Public Member Functions inherited from org.bukkit.material.MaterialData
 MaterialData (final int type)
 
 MaterialData (final Material type)
 
 MaterialData (final int type, final byte data)
 
 MaterialData (final Material type, final byte data)
 
byte getData ()
 
void setData (byte data)
 
Material getItemType ()
 
int getItemTypeId ()
 
ItemStack toItemStack ()
 
ItemStack toItemStack (int amount)
 
String toString ()
 
int hashCode ()
 
boolean equals (Object obj)
 
MaterialData clone ()
 

Detailed Description

Represents the tripwire

Definition at line 8 of file Tripwire.java.

Constructor & Destructor Documentation

org.bukkit.material.Tripwire.Tripwire ( final int  type)
Deprecated:
Magic value

Definition at line 19 of file Tripwire.java.

19  {
20  super(type);
21  }
org.bukkit.material.Tripwire.Tripwire ( final int  type,
final byte  data 
)
Deprecated:
Magic value

Definition at line 28 of file Tripwire.java.

28  {
29  super(type, data);
30  }

Member Function Documentation

boolean org.bukkit.material.Tripwire.isActivated ( )

Test if tripwire is currently activated

Returns
true if activated, false if not

Definition at line 37 of file Tripwire.java.

References org.bukkit.material.MaterialData.getData().

37  {
38  return (getData() & 0x4) != 0;
39  }
boolean org.bukkit.material.Tripwire.isObjectTriggering ( )

Test if object triggering this tripwire directly

Returns
true if object activating tripwire, false if not

Definition at line 59 of file Tripwire.java.

References org.bukkit.material.MaterialData.getData().

59  {
60  return (getData() & 0x1) != 0;
61  }
void org.bukkit.material.Tripwire.setActivated ( boolean  act)

Set tripwire activated state

Parameters
act- true if activated, false if not

Definition at line 46 of file Tripwire.java.

References org.bukkit.material.MaterialData.getData(), and org.bukkit.material.MaterialData.setData().

46  {
47  int dat = getData() & (0x8 | 0x3);
48  if (act) {
49  dat |= 0x4;
50  }
51  setData((byte) dat);
52  }
void org.bukkit.material.Tripwire.setObjectTriggering ( boolean  trig)

Set object triggering state for this tripwire

Parameters
trig- true if object activating tripwire, false if not

Definition at line 68 of file Tripwire.java.

References org.bukkit.material.MaterialData.getData(), and org.bukkit.material.MaterialData.setData().

68  {
69  int dat = getData() & 0xE;
70  if (trig) {
71  dat |= 0x1;
72  }
73  setData((byte) dat);
74  }

The documentation for this class was generated from the following file: