* @param lever block
* @param down state to set to
*/
public static void setLever(org.bukkit.block.Block lever, boolean down) {
int data = getRawData(lever);
Lever newMaterialData = (Lever) getData(Material.LEVER, data);
newMaterialData.setPowered(down);
if (getRawData(newMaterialData) != data) {
// CraftBukkit start - Redstone event for lever
int old = !down ? 1 : 0;
int current = down ? 1 : 0;
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(lever, old, current);