Interface RedstoneInputEvent
- All Superinterfaces:
Cancellable, Event, RedstoneEvent
Fired when a block that listens to redstone is about to react to being powered, or to no longer
being powered: a lamp lighting up or going out, a door, a trapdoor or a fence gate opening or
closing, a note block playing, a copper bulb switching.
It is fired when the block reacts, which is not always when the signal changes: a lamp goes out four game ticks after it lost its signal, and the event is fired then.
Cancelling the event leaves the block as it is: the door stays shut, the lamp stays off. As the block did not take the signal into account, the next update reaching it fires the event again.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanpowered()Returnstrueif the block is now powered,falseif it lost its signal.Methods inherited from interface Cancellable
isCancelled, setCancelledMethods inherited from interface RedstoneEvent
block, position, world
-
Method Details
-
powered
boolean powered()Returnstrueif the block is now powered,falseif it lost its signal.- Returns:
trueif the block is now powered,falseif it lost its signal- Since:
- 0.1.0
-