Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
PlayerExpChangeEvent.java
1 package org.bukkit.event.player;
2 
3 import org.bukkit.entity.Player;
5 
6 /**
7  * Called when a players experience changes naturally
8  */
9 public class PlayerExpChangeEvent extends PlayerEvent {
10  private static final HandlerList handlers = new HandlerList();
11  private int exp;
12 
13  public PlayerExpChangeEvent(final Player player, final int expAmount) {
14  super(player);
15  exp = expAmount;
16  }
17 
18  /**
19  * Get the amount of experience the player will receive
20  *
21  * @return The amount of experience
22  */
23  public int getAmount() {
24  return exp;
25  }
26 
27  /**
28  * Set the amount of experience the player will receive
29  *
30  * @param amount The amount of experience to set
31  */
32  public void setAmount(int amount) {
33  exp = amount;
34  }
35 
36  @Override
37  public HandlerList getHandlers() {
38  return handlers;
39  }
40 
41  public static HandlerList getHandlerList() {
42  return handlers;
43  }
44 }