com.skillw.attsystem.util.Format.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of AttributeSystem Show documentation
Show all versions of AttributeSystem Show documentation
Bukkit Attribute Engine Plugin.
The newest version!
package com.skillw.attsystem.util
import java.text.NumberFormat
object Format {
@JvmStatic
val format: NumberFormat by lazy {
val numberFormat = NumberFormat.getInstance()
numberFormat.isGroupingUsed = false
numberFormat
}
@JvmStatic
fun format(number: Number): String {
return format.format(number)
}
fun Number.real(): String {
return format.format(this)
}
}