Ton of Material extensions handling the meta-data of blocks.
By: sunkid <sunkid@iminurnetz.com>
This commit is contained in:
@ -7,6 +7,10 @@ import org.bukkit.Material;
|
||||
* Represents redstone wire
|
||||
*/
|
||||
public class RedstoneWire extends MaterialData implements Redstone {
|
||||
public RedstoneWire() {
|
||||
super(Material.REDSTONE_WIRE);
|
||||
}
|
||||
|
||||
public RedstoneWire(final int type) {
|
||||
super(type);
|
||||
}
|
||||
@ -32,4 +36,9 @@ public class RedstoneWire extends MaterialData implements Redstone {
|
||||
public boolean isPowered() {
|
||||
return getData() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + " " + (isPowered() ? "" : "NOT ") + "POWERED";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user