mirror of
https://github.com/Auxilor/EcoBits.git
synced 2025-12-20 15:39:29 +00:00
Oops
This commit is contained in:
@@ -192,8 +192,9 @@ fun BigDecimal.formatWithExtension(): String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun BigDecimal.formatWithCommas(): String {
|
fun BigDecimal.formatWithCommas(): String {
|
||||||
val decimalFormat = if (this.scale() > 0) DecimalFormat("#,###.00") else DecimalFormat("#,###")
|
val stripped = this.stripTrailingZeros()
|
||||||
return decimalFormat.format(this)
|
val decimalFormat = if (stripped.scale() > 0) DecimalFormat("#,##0.00") else DecimalFormat("#,##0")
|
||||||
|
return decimalFormat.format(stripped)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun OfflinePlayer.getBalance(currency: Currency): BigDecimal {
|
fun OfflinePlayer.getBalance(currency: Currency): BigDecimal {
|
||||||
|
|||||||
Reference in New Issue
Block a user