9
0
mirror of https://github.com/Auxilor/EcoSkills.git synced 2026-01-03 14:22:17 +00:00

Added option to prevent levelling when the player dies of fall damage

This commit is contained in:
Auxilor
2021-09-13 09:51:16 +01:00
parent 0fdb69611b
commit 78c5b09a6e
2 changed files with 7 additions and 1 deletions

View File

@@ -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)
}

View File

@@ -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
fall-damage-xp-per-hp: 16
# If experience should be given when the player dies of fall damage
give-xp-on-fatal-fall: false