mirror of
https://github.com/Auxilor/EcoSkills.git
synced 2026-01-06 15:51:52 +00:00
Fixed exploration skill disable
Before even if the skill was disabled the player was gaining XP from falling, now it's fixed.
This commit is contained in:
@@ -46,12 +46,8 @@ class SkillExploration : Skill(
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
|
||||
fun handleLevelling(event: EntityDamageEvent) {
|
||||
|
||||
val player = event.entity
|
||||
|
||||
if (player !is Player) {
|
||||
return
|
||||
}
|
||||
val player = (event.entity as? Player)?.filterSkillEnabled() ?: return
|
||||
|
||||
if (this.config.getStrings("disabled-in-worlds").containsIgnoreCase(player.getWorld().getName())) {
|
||||
return
|
||||
}
|
||||
@@ -71,4 +67,4 @@ class SkillExploration : Skill(
|
||||
val xp = this.config.getDouble("fall-damage-xp-per-hp") * event.finalDamage
|
||||
player.giveSkillExperience(this, xp)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user