Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
RedstoneWire.java
Go to the documentation of this file.
1 package org.bukkit.material;
2 
3 import org.bukkit.Material;
4 
8 public 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 
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 
44  @Override
45  public RedstoneWire clone() {
46  return (RedstoneWire) super.clone();
47  }
48 }