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

Fixed decimals formatting in MagneticRod description

This commit is contained in:
_OfTeN_
2021-11-11 19:49:55 +03:00
parent 10798f7cc7
commit 051b3beb0e

View File

@@ -1,5 +1,6 @@
package com.willfp.ecoskills.effects.effects
import com.willfp.eco.util.NumberUtils
import com.willfp.ecoskills.effects.Effect
import com.willfp.ecoskills.getEffectLevel
import org.bukkit.event.EventHandler
@@ -10,7 +11,7 @@ class EffectMagneticRod : Effect(
"magnetic_rod"
) {
override fun formatDescription(string: String, level: Int): String {
return string.replace("%percentage%", (level * config.getDouble("speed-per-level")).toString())
return string.replace("%percentage%", NumberUtils.format(level * config.getDouble("speed-per-level")))
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)