Ton of Material extensions handling the meta-data of blocks.
By: sunkid <sunkid@iminurnetz.com>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user