2012-03-27 05:01:51 +02:00
|
|
|
package com.gmail.nossr50.events;
|
|
|
|
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
import org.bukkit.event.HandlerList;
|
|
|
|
import org.bukkit.event.player.PlayerEvent;
|
|
|
|
|
|
|
|
import com.gmail.nossr50.datatypes.SkillType;
|
|
|
|
|
|
|
|
public class McMMOPlayerSkillEvent extends PlayerEvent{
|
|
|
|
|
|
|
|
protected SkillType skill;
|
|
|
|
protected int skillLevel;
|
|
|
|
|
|
|
|
public McMMOPlayerSkillEvent(Player player, SkillType skill) {
|
|
|
|
super(player);
|
|
|
|
this.skill = skill;
|
2012-03-27 06:18:04 +02:00
|
|
|
this.skillLevel = skill.getSkillLevel(player);
|
2012-03-27 05:01:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public SkillType getSkill() {
|
|
|
|
return skill;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Rest of file is required boilerplate for custom events **/
|
|
|
|
private static final HandlerList handlers = new HandlerList();
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public HandlerList getHandlers() {
|
|
|
|
return handlers;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static HandlerList getHandlerList() {
|
|
|
|
return handlers;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|