Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.material.PoweredRail Class Reference
Inheritance diagram for org.bukkit.material.PoweredRail:
org.bukkit.material.ExtendedRails org.bukkit.material.Redstone org.bukkit.material.Rails org.bukkit.material.MaterialData

Public Member Functions

 PoweredRail (final int type)
 
 PoweredRail (final Material type)
 
 PoweredRail (final int type, final byte data)
 
 PoweredRail (final Material type, final byte data)
 
boolean isPowered ()
 
void setPowered (boolean isPowered)
 
PoweredRail clone ()
 
- Public Member Functions inherited from org.bukkit.material.ExtendedRails
 ExtendedRails (final int type)
 
 ExtendedRails (final Material type)
 
 ExtendedRails (final int type, final byte data)
 
 ExtendedRails (final Material type, final byte data)
 
boolean isCurve ()
 
void setDirection (BlockFace face, boolean isOnSlope)
 
ExtendedRails clone ()
 
- Public Member Functions inherited from org.bukkit.material.Rails
 Rails (final int type)
 
 Rails (final Material type)
 
 Rails (final int type, final byte data)
 
 Rails (final Material type, final byte data)
 
boolean isOnSlope ()
 
boolean isCurve ()
 
BlockFace getDirection ()
 
String toString ()
 
void setDirection (BlockFace face, boolean isOnSlope)
 
Rails clone ()
 
- 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 ()
 

Additional Inherited Members

- Protected Member Functions inherited from org.bukkit.material.ExtendedRails
byte getConvertedData ()
 
- Protected Member Functions inherited from org.bukkit.material.Rails
byte getConvertedData ()
 

Detailed Description

Represents a powered rail

Definition at line 8 of file PoweredRail.java.

Constructor & Destructor Documentation

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

Definition at line 18 of file PoweredRail.java.

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

Definition at line 31 of file PoweredRail.java.

31  {
32  super(type, data);
33  }
org.bukkit.material.PoweredRail.PoweredRail ( final Material  type,
final byte  data 
)
Deprecated:
Magic value

Definition at line 40 of file PoweredRail.java.

40  {
41  super(type, data);
42  }

Member Function Documentation

boolean org.bukkit.material.PoweredRail.isPowered ( )

Gets the current state of this Material, indicating if it's powered or unpowered

Returns
true if powered, otherwise false

Implements org.bukkit.material.Redstone.

Definition at line 44 of file PoweredRail.java.

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

44  {
45  return (getData() & 0x8) == 0x8;
46  }
void org.bukkit.material.PoweredRail.setPowered ( boolean  isPowered)

Set whether this PoweredRail should be powered or not.

Parameters
isPoweredwhether or not the rail is powered

Definition at line 53 of file PoweredRail.java.

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

53  {
54  setData((byte) (isPowered ? (getData() | 0x8) : (getData() & ~0x8)));
55  }

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