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

This commit is contained in:
sunkid
2011-04-02 16:42:12 -07:00
committed by Erik Broes
parent 89f7386e87
commit 55e4fbfd14
31 changed files with 1203 additions and 135 deletions

View File

@@ -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();
}
}