Ton of Material extensions handling the meta-data of blocks.
By: sunkid <sunkid@iminurnetz.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package org.bukkit.material;
|
||||
|
||||
import org.bukkit.Material;
|
||||
|
||||
/**
|
||||
* Represents a pressure plate
|
||||
* @author CelticMinstrel
|
||||
*
|
||||
*/
|
||||
public class PressurePlate extends MaterialData {
|
||||
public PressurePlate() {
|
||||
super(Material.WOOD_PLATE);
|
||||
}
|
||||
|
||||
public PressurePlate(int type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
public PressurePlate(Material type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
public PressurePlate(int type, byte data) {
|
||||
super(type, data);
|
||||
}
|
||||
|
||||
public PressurePlate(Material type, byte data) {
|
||||
super(type, data);
|
||||
}
|
||||
|
||||
public boolean isPressed() {
|
||||
return getData() == 0x1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + (isPressed() ? " PRESSED" : "");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user