Package org.bukkit.event.block
Class BlockSpreadEvent
- java.lang.Object
-
- org.bukkit.event.Event
-
- org.bukkit.event.block.BlockEvent
-
- org.bukkit.event.block.BlockGrowEvent
-
- org.bukkit.event.block.BlockFormEvent
-
- org.bukkit.event.block.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 a Block Spread event is cancelled, the block will not spread.
- See Also:
BlockFormEvent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
-
Field Summary
-
Fields inherited from class org.bukkit.event.block.BlockEvent
block
-
-
Constructor Summary
Constructors Constructor Description BlockSpreadEvent(Block block, Block source, BlockState newState)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HandlerList
getHandlerList()
HandlerList
getHandlers()
Block
getSource()
Gets the source block involved in this event.-
Methods inherited from class org.bukkit.event.block.BlockGrowEvent
getNewState, isCancelled, setCancelled
-
Methods inherited from class org.bukkit.event.block.BlockEvent
getBlock
-
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
-
-
-
Constructor Detail
-
BlockSpreadEvent
public BlockSpreadEvent(@NotNull Block block, @NotNull Block source, @NotNull BlockState newState)
-
-
Method Detail
-
getSource
@NotNull public Block getSource()
Gets the source block involved in this event.- Returns:
- the Block for the source block involved in this event.
-
getHandlers
@NotNull public HandlerList getHandlers()
- Overrides:
getHandlers
in classBlockFormEvent
-
getHandlerList
@NotNull public static HandlerList getHandlerList()
-
-