Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
LeavesDecayEvent.java
1 package org.bukkit.event.block;
2 
3 import org.bukkit.block.Block;
6 
7 /**
8  * Called when leaves are decaying naturally.
9  * <p>
10  * If a Leaves Decay event is cancelled, the leaves will not decay.
11  */
12 public class LeavesDecayEvent extends BlockEvent implements Cancellable {
13  private static final HandlerList handlers = new HandlerList();
14  private boolean cancel = false;
15 
16  public LeavesDecayEvent(final Block block) {
17  super(block);
18  }
19 
20  public boolean isCancelled() {
21  return cancel;
22  }
23 
24  public void setCancelled(boolean cancel) {
25  this.cancel = cancel;
26  }
27 
28  @Override
29  public HandlerList getHandlers() {
30  return handlers;
31  }
32 
33  public static HandlerList getHandlerList() {
34  return handlers;
35  }
36 }