mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Added ability to get skill level from McMMOPlayerExperience events.
This commit is contained in:
parent
dd170ec7ef
commit
933449f16b
@ -9,6 +9,7 @@ Key:
|
||||
|
||||
Version 1.3.04-dev
|
||||
+ Added McMMOPlayerRepairEvent for API usage - fires after completion of a repair.
|
||||
+ Added ability to get skill level from McMMOPlayerExperience events
|
||||
= Fixed Shake ability dropping bonemeal instead of ink for squids.
|
||||
= Fixed Green Terra & Super Breaker awarding 4x drops at high levels.
|
||||
= Fixed summoned ocelots never changing skins.
|
||||
|
@ -6,19 +6,25 @@ import org.bukkit.event.player.PlayerEvent;
|
||||
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
|
||||
public class McMMOPlayerExperienceEvent extends PlayerEvent{
|
||||
public class McMMOPlayerExperienceEvent extends PlayerEvent {
|
||||
|
||||
protected SkillType skill;
|
||||
protected int skillLevel;
|
||||
|
||||
public McMMOPlayerExperienceEvent(Player player, SkillType skill) {
|
||||
super(player);
|
||||
this.skill = skill;
|
||||
this.skillLevel = skill.getSkillLevel(player);
|
||||
}
|
||||
|
||||
public SkillType getSkill() {
|
||||
return skill;
|
||||
}
|
||||
|
||||
public int getSkillLevel() {
|
||||
return skillLevel;
|
||||
}
|
||||
|
||||
/** Rest of file is required boilerplate for custom events **/
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user