diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/skills/SkillExploration.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/skills/SkillExploration.kt index 02bcbd5..f48808f 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/skills/SkillExploration.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/skills/SkillExploration.kt @@ -60,6 +60,10 @@ class SkillExploration : Skill( return } + if (event.finalDamage > player.health && !this.config.getBool("give-xp-on-fatal-fall")) { + return + } + val xp = this.config.getDouble("fall-damage-xp-per-hp") * event.finalDamage player.giveSkillExperience(this, xp) } diff --git a/eco-core/core-plugin/src/main/resources/skills/exploration.yml b/eco-core/core-plugin/src/main/resources/skills/exploration.yml index 25324a9..d05ab64 100644 --- a/eco-core/core-plugin/src/main/resources/skills/exploration.yml +++ b/eco-core/core-plugin/src/main/resources/skills/exploration.yml @@ -77,4 +77,6 @@ base-xp-to-give: 20 # If the amount of xp given should be higher when travelling faster multiply-xp-by-speed: true # The amount of experience to give for each point of fall damage taken -fall-damage-xp-per-hp: 16 \ No newline at end of file +fall-damage-xp-per-hp: 16 +# If experience should be given when the player dies of fall damage +give-xp-on-fatal-fall: false \ No newline at end of file