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:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user