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

Fixed gui showing incorrect reward

This commit is contained in:
Auxilor
2021-08-25 18:51:55 +01:00
parent b30efd373e
commit ff11f12008
2 changed files with 3 additions and 6 deletions

View File

@@ -71,8 +71,6 @@ class CommandTop(plugin: EcoPlugin) :
line = line.replace("%playername%", name)
line = StringUtils.format(line)
lines.add(line)
rank++
@@ -85,7 +83,7 @@ class CommandTop(plugin: EcoPlugin) :
}
for (message in messages) {
sender.sendMessage(message)
sender.sendMessage(StringUtils.format(message))
}
}
}

View File

@@ -12,7 +12,6 @@ import com.willfp.ecoskills.effects.Effect
import com.willfp.ecoskills.effects.Effects
import com.willfp.ecoskills.getSkillLevel
import com.willfp.ecoskills.stats.Stats
import org.bukkit.Bukkit
import org.bukkit.NamespacedKey
import org.bukkit.entity.Player
import org.bukkit.event.Listener
@@ -100,7 +99,7 @@ abstract class Skill(
fun getCumulativeLevelUpReward(skillObject: SkillObject, to: Int): Int {
var levels = 0
for (i in 0..to) {
for (i in 1..to) {
levels += getLevelUpReward(skillObject, i)
}
@@ -165,7 +164,7 @@ abstract class Skill(
s = s.replace("%ecoskills_${skillObject.id}_numeral%", NumberUtils.toNumeral(objLevel))
if (skillObject is Effect) {
s = s.replace("%ecoskills_${skillObject.id}_description%", skillObject.getDescription(level))
s = s.replace("%ecoskills_${skillObject.id}_description%", skillObject.getDescription(objLevel))
}
}