Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
Wool.java
Go to the documentation of this file.
1 package org.bukkit.material;
2 
3 import org.bukkit.DyeColor;
4 import org.bukkit.Material;
5 
9 public class Wool extends MaterialData implements Colorable {
10  public Wool() {
11  super(Material.WOOL);
12  }
13 
14  public Wool(DyeColor color) {
15  this();
16  setColor(color);
17  }
18 
19  public Wool(final int type) {
20  super(type);
21  }
22 
23  public Wool(final Material type) {
24  super(type);
25  }
26 
27  public Wool(final int type, final byte data) {
28  super(type, data);
29  }
30 
31  public Wool(final Material type, final byte data) {
32  super(type, data);
33  }
34 
40  public DyeColor getColor() {
41  return DyeColor.getByWoolData(getData());
42  }
43 
49  public void setColor(DyeColor color) {
50  setData(color.getWoolData());
51  }
52 
53  @Override
54  public String toString() {
55  return getColor() + " " + super.toString();
56  }
57 
58  @Override
59  public Wool clone() {
60  return (Wool) super.clone();
61  }
62 }