diff options
author | Linnea Gräf <nea@nea.moe> | 2025-04-01 01:37:55 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2025-04-01 01:37:55 +0200 |
commit | bda040c6c2cc77c9c1a06a61b2f13548d28d76ec (patch) | |
tree | 3c48dc96cfd74a6a7d167e45eaccca0bec74fb12 /src/main/kotlin/util/textutil.kt | |
parent | 4f4652bb0d50dfd37297a573ad73ef9cd1a8e92d (diff) | |
download | Firmament-mc1.21.5.tar.gz Firmament-mc1.21.5.tar.bz2 Firmament-mc1.21.5.zip |
WIP: Port some 1.21.5 thingsmc1.21.5
Diffstat (limited to 'src/main/kotlin/util/textutil.kt')
-rw-r--r-- | src/main/kotlin/util/textutil.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/kotlin/util/textutil.kt b/src/main/kotlin/util/textutil.kt index 806f61e..4ef7f76 100644 --- a/src/main/kotlin/util/textutil.kt +++ b/src/main/kotlin/util/textutil.kt @@ -127,13 +127,13 @@ fun MutableText.darkGrey() = withColor(Formatting.DARK_GRAY) fun MutableText.red() = withColor(Formatting.RED) fun MutableText.white() = withColor(Formatting.WHITE) fun MutableText.bold(): MutableText = styled { it.withBold(true) } -fun MutableText.hover(text: Text): MutableText = styled {it.withHoverEvent(HoverEvent(HoverEvent.Action.SHOW_TEXT, text))} +fun MutableText.hover(text: Text): MutableText = styled {it.withHoverEvent(HoverEvent.ShowText(text))} fun MutableText.clickCommand(command: String): MutableText { require(command.startsWith("/")) return this.styled { - it.withClickEvent(ClickEvent(ClickEvent.Action.RUN_COMMAND, command)) + it.withClickEvent(ClickEvent.RunCommand(command)) } } |