Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
BlockFormEvent.java
1 package org.bukkit.event.block;
2 
3 import org.bukkit.block.Block;
7 
8 /**
9  * Called when a block is formed or spreads based on world conditions.
10  * <p>
11  * Use {@link BlockSpreadEvent} to catch blocks that actually spread and don't
12  * just "randomly" form.
13  * <p>
14  * Examples:
15  * <ul>
16  * <li>Snow forming due to a snow storm.
17  * <li>Ice forming in a snowy Biome like Taiga or Tundra.
18  * </ul>
19  * <p>
20  * If a Block Form event is cancelled, the block will not be formed.
21  *
22  * @see BlockSpreadEvent
23  */
24 public class BlockFormEvent extends BlockGrowEvent implements Cancellable {
25  private static final HandlerList handlers = new HandlerList();
26 
27  public BlockFormEvent(final Block block, final BlockState newState) {
28  super(block, newState);
29  }
30 
31  @Override
32  public HandlerList getHandlers() {
33  return handlers;
34  }
35 
36  public static HandlerList getHandlerList() {
37  return handlers;
38  }
39 }