Class BlockSpreadEvent

All Implemented Interfaces:
Cancellable

public class BlockSpreadEvent extends BlockFormEvent
Called when a block spreads based on world conditions.

Use BlockFormEvent to catch blocks that "randomly" form instead of actually spread.

Examples:

  • Mushrooms spreading.
  • Fire spreading.

If this event is cancelled, the block will not spread.

See Also:
  • Constructor Details

    • BlockSpreadEvent

      @Internal public BlockSpreadEvent(@NotNull @NotNull Block block, @NotNull @NotNull Block source, @NotNull @NotNull BlockState newState)
  • Method Details

    • getSource

      @NotNull public @NotNull Block getSource()
      Gets the source block involved in this event.
      Returns:
      the Block for the source block involved in this event.
    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      Overrides:
      getHandlers in class BlockFormEvent
    • getHandlerList

      @NotNull public static @NotNull HandlerList getHandlerList()