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

Public Member Functions

 Command (final int type)
 
 Command (final Material type)
 
 Command (final int type, final byte data)
 
 Command (final Material type, final byte data)
 
boolean isPowered ()
 
void setPowered (boolean bool)
 
String toString ()
 
Command 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 ()
 

Detailed Description

Represents a command block

Definition at line 8 of file material/Command.java.

Constructor & Destructor Documentation

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

Definition at line 18 of file material/Command.java.

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

Definition at line 31 of file material/Command.java.

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

Definition at line 40 of file material/Command.java.

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

Member Function Documentation

boolean org.bukkit.material.Command.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 50 of file material/Command.java.

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

50  {
51  return (getData() & 1) != 0;
52  }
void org.bukkit.material.Command.setPowered ( boolean  bool)

Sets the current state of this Material

Parameters
boolwhether or not the command block is powered

Definition at line 60 of file material/Command.java.

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

60  {
61  setData((byte) (bool ? (getData() | 1) : (getData() & -2)));
62  }

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