Class: LeverActionAfterEventSignal
Manages callbacks that are connected to lever moves (activates or deactivates).
Example
import { world, system, LeverActionAfterEvent } from '@minecraft/server';
world.afterEvents.leverAction.subscribe((leverActivateEvent: LeverActionAfterEvent) => {
console.warn(
`Lever event at ${system.currentTick} with power: ${leverActivateEvent.block.getRedstonePower()}`,
);
});
Extends
Constructors
new LeverActionAfterEventSignal()
private
new LeverActionAfterEventSignal():LeverActionAfterEventSignal
Returns
Overrides
ILeverActionAfterEventSignal
. constructor