Added setters to applicable MaterialData classes.

By: sunkid <sunkid@iminurnetz.com>
This commit is contained in:
Bukkit/Spigot
2011-06-16 15:45:50 -07:00
parent 93406ae5d2
commit 615b1a9f3f
17 changed files with 139 additions and 20 deletions

View File

@@ -37,6 +37,14 @@ public class Lever extends SimpleAttachableMaterialData implements Redstone {
return (getData() & 0x8) == 0x8;
}
/**
* Set this lever to be powered or not.
* @param isPowered whether the lever should be powered or not
*/
public void setPowered(boolean isPowered) {
setData((byte) (isPowered ? (getData() | 0x8) : (getData() & ~0x8)));
}
/**
* Gets the face that this block is attached on
*