Ton of Material extensions handling the meta-data of blocks.

By: sunkid <sunkid@iminurnetz.com>
This commit is contained in:
Bukkit/Spigot
2011-04-02 16:42:12 -07:00
parent a449fb01d1
commit 84a31c3951
31 changed files with 1203 additions and 135 deletions

View File

@@ -8,6 +8,15 @@ import org.bukkit.Material;
* @author sunkid
*/
public class Coal extends MaterialData {
public Coal() {
super(Material.COAL);
}
public Coal(CoalType type) {
this();
setType(type);
}
public Coal(final int type) {
super(type);
}
@@ -37,8 +46,25 @@ public class Coal extends MaterialData {
* Sets the type of this coal
*
* @param type New type of this coal
* @deprecated use {@link #setType(CoalType)} instead
*/
@Deprecated
public void setSpecies(CoalType type) {
setData(type.getData());
setType(type);
}
/**
* Sets the type of this coal
*
* @param type New type of this coal
*/
public void setType(CoalType type) {
setData(type.getData());
}
@Override
public String toString() {
return getType() + " " + super.toString();
}
}