Skip to content

Commit 22b6433

Browse files
committed
text: fix float, double formatting
1 parent 0c6ee8f commit 22b6433

File tree

1 file changed

+2
-2
lines changed
  • src/main/java/de/bixilon/minosoft/util

1 file changed

+2
-2
lines changed

src/main/java/de/bixilon/minosoft/util/KUtil.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ object KUtil {
147147
fun TextFormattable.format() = ChatComponent.of(this.toText())
148148
fun Identified.format() = identifier.format()
149149
fun Boolean.format() = if (this) TextFormattable.TRUE else TextFormattable.FALSE
150-
inline fun Float.format() = TextComponent("§d%.3f".format(this)).color(ChatColors.LIGHT_PURPLE)
151-
inline fun Double.format() = TextComponent("§d%.4f".format(this)).color(ChatColors.LIGHT_PURPLE)
150+
inline fun Float.format() = TextComponent("%.3f".format(this)).color(ChatColors.LIGHT_PURPLE)
151+
inline fun Double.format() = TextComponent("%.4f".format(this)).color(ChatColors.LIGHT_PURPLE)
152152
inline fun Number.format() = TextComponent(this.toString()).color(ChatColors.LIGHT_PURPLE)
153153

154154
fun ResourceLocation.format() = TextComponent(this.toString()).color(ChatColors.GOLD)

0 commit comments

Comments
 (0)