001 package org.bukkit.event.block; 002 003 import org.bukkit.block.Block; 004 import org.bukkit.event.Cancellable; 005 import org.bukkit.event.HandlerList; 006 007 /** 008 * Called when a block is destroyed as a result of being burnt by fire. 009 * <p> 010 * If a Block Burn event is cancelled, the block will not be destroyed as a 011 * result of being burnt by fire. 012 */ 013 public class BlockBurnEvent extends BlockEvent implements Cancellable { 014 private static final HandlerList handlers = new HandlerList(); 015 private boolean cancelled; 016 017 public BlockBurnEvent(final Block block) { 018 super(block); 019 this.cancelled = false; 020 } 021 022 public boolean isCancelled() { 023 return cancelled; 024 } 025 026 public void setCancelled(boolean cancel) { 027 this.cancelled = cancel; 028 } 029 030 @Override 031 public HandlerList getHandlers() { 032 return handlers; 033 } 034 035 public static HandlerList getHandlerList() { 036 return handlers; 037 } 038 }