diff options
author | Linnea Gräf <nea@nea.moe> | 2024-12-25 16:15:20 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-12-25 16:15:20 +0100 |
commit | ddebaf47900dfab41590c97c202984142ae5b9f6 (patch) | |
tree | 498859e320b19d3bc7559f5585174afb78e132b4 /src/main/kotlin/util/textutil.kt | |
parent | e16c60169bf192b79991176b5f9cee66b5b16e7d (diff) | |
download | Firmament-ddebaf47900dfab41590c97c202984142ae5b9f6.tar.gz Firmament-ddebaf47900dfab41590c97c202984142ae5b9f6.tar.bz2 Firmament-ddebaf47900dfab41590c97c202984142ae5b9f6.zip |
WIP: Reforge Recipes
Diffstat (limited to 'src/main/kotlin/util/textutil.kt')
-rw-r--r-- | src/main/kotlin/util/textutil.kt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/kotlin/util/textutil.kt b/src/main/kotlin/util/textutil.kt index 06ed8c8..ab3de43 100644 --- a/src/main/kotlin/util/textutil.kt +++ b/src/main/kotlin/util/textutil.kt @@ -133,6 +133,7 @@ fun MutableText.darkGreen() = withColor(Formatting.DARK_GREEN) fun MutableText.purple() = withColor(Formatting.DARK_PURPLE) fun MutableText.pink() = withColor(Formatting.LIGHT_PURPLE) fun MutableText.yellow() = withColor(Formatting.YELLOW) +fun MutableText.gold() = withColor(Formatting.GOLD) fun MutableText.grey() = withColor(Formatting.GRAY) fun MutableText.red() = withColor(Formatting.RED) fun MutableText.white() = withColor(Formatting.WHITE) @@ -146,6 +147,11 @@ fun MutableText.clickCommand(command: String): MutableText { } } +fun MutableText.prepend(text: Text): MutableText { + siblings.addFirst(text) + return this +} + fun Text.transformEachRecursively(function: (Text) -> Text): Text { val c = this.content if (c is TranslatableTextContent) { |