org.bukkit.material.PressurePlate Maven / Gradle / Ivy
package org.bukkit.material;
import org.bukkit.Material;
/**
* Represents a pressure plate
*/
public class PressurePlate extends MaterialData implements PressureSensor {
public PressurePlate() {
super(Material.WOOD_PLATE);
}
/**
* @param type the raw type id
* @deprecated Magic value
*/
@Deprecated
public PressurePlate(int type) {
super(type);
}
public PressurePlate(Material type) {
super(type);
}
/**
* @param type the raw type id
* @param data the raw data value
* @deprecated Magic value
*/
@Deprecated
public PressurePlate(int type, byte data) {
super(type, data);
}
/**
* @param type the type
* @param data the raw data value
* @deprecated Magic value
*/
@Deprecated
public PressurePlate(Material type, byte data) {
super(type, data);
}
public boolean isPressed() {
return getData() == 0x1;
}
@Override
public String toString() {
return super.toString() + (isPressed() ? " PRESSED" : "");
}
@Override
public PressurePlate clone() {
return (PressurePlate) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy