Ton of Material extensions handling the meta-data of blocks.
This commit is contained in:
@@ -4,10 +4,14 @@ import org.bukkit.Material;
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
||||
/**
|
||||
* Represents the different types of coals.
|
||||
* Represents a door.
|
||||
* @author sunkid
|
||||
*/
|
||||
public class Door extends MaterialData {
|
||||
public Door() {
|
||||
super(Material.WOODEN_DOOR);
|
||||
}
|
||||
|
||||
public Door(final int type) {
|
||||
super(type);
|
||||
}
|
||||
@@ -54,4 +58,10 @@ public class Door extends MaterialData {
|
||||
|
||||
return BlockFace.NORTH_EAST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return (isTopHalf() ? "TOP" : "BOTTOM") + " half of " + (isOpen() ? "an OPEN " : "a CLOSED ") + super.toString() + " with hinges " + getHingeCorner();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user