From 974cf2d4a1116176e60d1b69bcd3264e68df87fd Mon Sep 17 00:00:00 2001 From: chatt Date: Fri, 12 Jul 2024 22:15:30 -0700 Subject: [PATCH] fix: round target xp in /stats --- .../kotlin/network/warzone/mars/player/commands/StatCommands.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/network/warzone/mars/player/commands/StatCommands.kt b/src/main/kotlin/network/warzone/mars/player/commands/StatCommands.kt index 706e24e..07fcead 100644 --- a/src/main/kotlin/network/warzone/mars/player/commands/StatCommands.kt +++ b/src/main/kotlin/network/warzone/mars/player/commands/StatCommands.kt @@ -111,7 +111,7 @@ class StatCommands { val nextLevel = level + 1 val currentLevelExpRequirement = PlayerStats.EXP_FORMULA.getExpRequiredForLevel(level) val nextLevelExpRequirement = PlayerStats.EXP_FORMULA.getExpRequiredForLevel(nextLevel) - return "${(xp - currentLevelExpRequirement).toInt()}/${nextLevelExpRequirement - currentLevelExpRequirement}" + return "${(xp - currentLevelExpRequirement).toInt()}/${(nextLevelExpRequirement - currentLevelExpRequirement).roundToInt()}" } private fun createLabelledStat(label: String, value: Any, type: StatType): Component {