Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
1package org.bukkit.event.block;
2
3import org.bukkit.block.Block;
4
5/**
6 * Called when a redstone current changes
7 */
8public class BlockRedstoneEvent extends BlockEvent {
9 private int oldCurrent;
10 private int newCurrent;
11
12 public BlockRedstoneEvent(Block block, int oldCurrent, int newCurrent) {
13 super(Type.REDSTONE_CHANGE, block);
14 this.oldCurrent = oldCurrent;
15 this.newCurrent = newCurrent;
16 }
17
18 /**
19 * Gets the old current of this block
20 *
21 * @return The previous current
22 */
23 public int getOldCurrent() {
24 return oldCurrent;
25 }
26
27 /**
28 * Gets the new current of this block
29 *
30 * @return The new current
31 */
32 public int getNewCurrent() {
33 return newCurrent;
34 }
35
36 /**
37 * Sets the new current of this block
38 *
39 * @param newCurrent The new current to set
40 */
41 public void setNewCurrent(int newCurrent) {
42 this.newCurrent = newCurrent;
43 }
44}