2012-03-27 07:09:28 +02:00
|
|
|
package com.gmail.nossr50.events.experience;
|
2012-02-11 06:02:48 +01:00
|
|
|
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
2013-03-01 06:52:01 +01:00
|
|
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
2012-02-11 06:02:48 +01:00
|
|
|
|
2012-04-01 04:20:35 +02:00
|
|
|
/**
|
|
|
|
* Called when a player gains XP in a skill
|
|
|
|
*/
|
2012-03-27 05:01:51 +02:00
|
|
|
public class McMMOPlayerXpGainEvent extends McMMOPlayerExperienceEvent {
|
2013-04-24 19:30:46 +02:00
|
|
|
private float xpGained;
|
2012-04-01 04:20:35 +02:00
|
|
|
|
2013-04-24 19:30:46 +02:00
|
|
|
public McMMOPlayerXpGainEvent(Player player, SkillType skill, float xpGained) {
|
2012-04-01 04:20:35 +02:00
|
|
|
super(player, skill);
|
|
|
|
this.xpGained = xpGained;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return The amount of experience gained in this event
|
|
|
|
*/
|
2013-04-24 19:30:46 +02:00
|
|
|
public float getRawXpGained() {
|
2012-04-01 04:20:35 +02:00
|
|
|
return xpGained;
|
|
|
|
}
|
2013-02-15 18:39:55 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param xpGained int amount of experience gained in this event
|
|
|
|
*/
|
2013-04-24 19:30:46 +02:00
|
|
|
@Deprecated
|
|
|
|
public int getXpGained() {
|
|
|
|
return (int) xpGained;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param xpGained int amount of experience gained in this event
|
|
|
|
*/
|
|
|
|
public void setRawXpGained(float xpGained) {
|
|
|
|
this.xpGained = xpGained;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param xpGained int amount of experience gained in this event
|
|
|
|
*/
|
|
|
|
@Deprecated
|
2013-02-15 18:39:55 +01:00
|
|
|
public void setXpGained(int xpGained) {
|
|
|
|
this.xpGained = xpGained;
|
|
|
|
}
|
2012-02-11 06:02:48 +01:00
|
|
|
}
|