Interface RedstoneInputEvent

All Superinterfaces:
Cancellable, Event, RedstoneEvent

public interface RedstoneInputEvent extends RedstoneEvent, Cancellable
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 Details

    • powered

      boolean powered()
      Returns true if the block is now powered, false if it lost its signal.
      Returns:
      true if the block is now powered, false if it lost its signal
      Since:
      0.1.0