001 package org.bukkit.material; 002 003 import org.bukkit.Material; 004 005 /** 006 * Represents a pressure plate 007 */ 008 public class PressurePlate extends MaterialData implements PressureSensor { 009 public PressurePlate() { 010 super(Material.WOOD_PLATE); 011 } 012 013 /** 014 * 015 * @deprecated Magic value 016 */ 017 @Deprecated 018 public PressurePlate(int type) { 019 super(type); 020 } 021 022 public PressurePlate(Material type) { 023 super(type); 024 } 025 026 /** 027 * 028 * @deprecated Magic value 029 */ 030 @Deprecated 031 public PressurePlate(int type, byte data) { 032 super(type, data); 033 } 034 035 /** 036 * 037 * @deprecated Magic value 038 */ 039 @Deprecated 040 public PressurePlate(Material type, byte data) { 041 super(type, data); 042 } 043 044 public boolean isPressed() { 045 return getData() == 0x1; 046 } 047 048 @Override 049 public String toString() { 050 return super.toString() + (isPressed() ? " PRESSED" : ""); 051 } 052 053 @Override 054 public PressurePlate clone() { 055 return (PressurePlate) super.clone(); 056 } 057 }