Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
1package org.bukkit.event.block;
2
3import org.bukkit.block.Block;
4import org.bukkit.block.BlockState;
5
6/**
7 * Called when a block spreads based on world conditions.
8 * Use {@link BlockFormEvent} to catch blocks that "randomly" form instead of actually spread.
9 * <p/>
10 * Examples:
11 * <ul>
12 * <li>Mushrooms spreading.</li>
13 * <li>Fire spreading.</li>
14 * </ul>
15 * <p/>
16 * If a Block Spread event is cancelled, the block will not spread.
17 *
18 * @see BlockFormEvent
19 */
20public class BlockSpreadEvent extends BlockFormEvent {
21 private Block source;
22
23 public BlockSpreadEvent(Block block, Block source, BlockState newState) {
24 super(Type.BLOCK_SPREAD, block, newState);
25 this.source = source;
26 }
27
28 /**
29 * Gets the source block involved in this event.
30 *
31 * @return the Block for the source block involved in this event.
32 */
33 public Block getSource() {
34 return source;
35 }
36}