From 051b3beb0e1a8e08be38ee960b82f3c985e9f0db Mon Sep 17 00:00:00 2001 From: _OfTeN_ Date: Thu, 11 Nov 2021 19:49:55 +0300 Subject: [PATCH] Fixed decimals formatting in MagneticRod description --- .../com/willfp/ecoskills/effects/effects/EffectMagneticRod.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/effects/EffectMagneticRod.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/effects/EffectMagneticRod.kt index eca74e1..851f8fa 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/effects/EffectMagneticRod.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/effects/EffectMagneticRod.kt @@ -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)