Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
BlockExpEvent.java
1 package org.bukkit.event.block;
2 
3 import org.bukkit.block.Block;
5 
6 /**
7  * An event that's called when a block yields experience.
8  */
9 public class BlockExpEvent extends BlockEvent {
10  private static final HandlerList handlers = new HandlerList();
11  private int exp;
12 
13  public BlockExpEvent(Block block, int exp) {
14  super(block);
15 
16  this.exp = exp;
17  }
18 
19  /**
20  * Get the experience dropped by the block after the event has processed
21  *
22  * @return The experience to drop
23  */
24  public int getExpToDrop() {
25  return exp;
26  }
27 
28  /**
29  * Set the amount of experience dropped by the block after the event has
30  * processed
31  *
32  * @param exp 1 or higher to drop experience, else nothing will drop
33  */
34  public void setExpToDrop(int exp) {
35  this.exp = exp;
36  }
37 
38  public HandlerList getHandlers() {
39  return handlers;
40  }
41 
42  public static HandlerList getHandlerList() {
43  return handlers;
44  }
45 }