001 package org.bukkit.event.block; 002 003 import org.bukkit.block.Block; 004 import org.bukkit.block.BlockState; 005 import org.bukkit.event.Cancellable; 006 import org.bukkit.event.HandlerList; 007 008 /** 009 * Called when a block is formed or spreads based on world conditions. 010 * <p> 011 * Use {@link BlockSpreadEvent} to catch blocks that actually spread and don't 012 * just "randomly" form. 013 * <p> 014 * Examples: 015 * <ul> 016 * <li>Snow forming due to a snow storm. 017 * <li>Ice forming in a snowy Biome like Taiga or Tundra. 018 * </ul> 019 * <p> 020 * If a Block Form event is cancelled, the block will not be formed. 021 * 022 * @see BlockSpreadEvent 023 */ 024 public class BlockFormEvent extends BlockGrowEvent implements Cancellable { 025 private static final HandlerList handlers = new HandlerList(); 026 027 public BlockFormEvent(final Block block, final BlockState newState) { 028 super(block, newState); 029 } 030 031 @Override 032 public HandlerList getHandlers() { 033 return handlers; 034 } 035 036 public static HandlerList getHandlerList() { 037 return handlers; 038 } 039 }