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 leaves are decaying naturally.
009     * <p>
010     * If a Leaves Decay event is cancelled, the leaves will not decay.
011     */
012    public class LeavesDecayEvent extends BlockEvent implements Cancellable {
013        private static final HandlerList handlers = new HandlerList();
014        private boolean cancel = false;
015    
016        public LeavesDecayEvent(final Block block) {
017            super(block);
018        }
019    
020        public boolean isCancelled() {
021            return cancel;
022        }
023    
024        public void setCancelled(boolean cancel) {
025            this.cancel = cancel;
026        }
027    
028        @Override
029        public HandlerList getHandlers() {
030            return handlers;
031        }
032    
033        public static HandlerList getHandlerList() {
034            return handlers;
035        }
036    }