diff --git a/Changelog.txt b/Changelog.txt index 74bc016e7..bf18b0d99 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -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. diff --git a/src/main/java/com/gmail/nossr50/events/McMMOPlayerExperienceEvent.java b/src/main/java/com/gmail/nossr50/events/McMMOPlayerExperienceEvent.java index 4e393161c..d1672cbbf 100644 --- a/src/main/java/com/gmail/nossr50/events/McMMOPlayerExperienceEvent.java +++ b/src/main/java/com/gmail/nossr50/events/McMMOPlayerExperienceEvent.java @@ -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();