Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
1package org.bukkit.material;
2
3import org.bukkit.Material;
4
5/**
6 * Represents redstone wire
7 */
8public class RedstoneWire extends MaterialData implements Redstone {
9 public RedstoneWire() {
10 super(Material.REDSTONE_WIRE);
11 }
12
13 public RedstoneWire(final int type) {
14 super(type);
15 }
16
17 public RedstoneWire(final Material type) {
18 super(type);
19 }
20
21 public RedstoneWire(final int type, final byte data) {
22 super(type, data);
23 }
24
25 public RedstoneWire(final Material type, final byte data) {
26 super(type, data);
27 }
28
29 /**
30 * Gets the current state of this Material, indicating if it's powered or
31 * unpowered
32 *
33 * @return true if powered, otherwise false
34 */
35 public boolean isPowered() {
36 return getData() > 0;
37 }
38
39 @Override
40 public String toString() {
41 return super.toString() + " " + (isPowered() ? "" : "NOT ") + "POWERED";
42 }
43}