diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/currencies/Currency.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/currencies/Currency.kt index 068b365..3ea6f19 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/currencies/Currency.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/currencies/Currency.kt @@ -192,7 +192,8 @@ fun BigDecimal.formatWithExtension(): String { } fun BigDecimal.formatWithCommas(): String { - return DecimalFormat("#,###.00").format(this) + val decimalFormat = if (this.scale() > 0) DecimalFormat("#,###.00") else DecimalFormat("#,###") + return decimalFormat.format(this) } fun OfflinePlayer.getBalance(currency: Currency): BigDecimal {