diff options
author | Linnea Gräf <nea@nea.moe> | 2024-05-03 17:30:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-03 17:30:54 +0200 |
commit | ef7fcbfdf3bf954275e1d3b0c08c13214bff0f01 (patch) | |
tree | c5b9033f93374cee7b58a2cedad572f8418bc01a /src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt | |
parent | 977aae8a011f598a88cbf118d6441efca416ac14 (diff) | |
download | skyhanni-ef7fcbfdf3bf954275e1d3b0c08c13214bff0f01.tar.gz skyhanni-ef7fcbfdf3bf954275e1d3b0c08c13214bff0f01.tar.bz2 skyhanni-ef7fcbfdf3bf954275e1d3b0c08c13214bff0f01.zip |
Add shtestmessage for complex messages (#1663)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt index b155f2b73..c2292845c 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt @@ -10,6 +10,7 @@ import net.minecraft.client.Minecraft import net.minecraft.event.ClickEvent import net.minecraft.event.HoverEvent import net.minecraft.util.ChatComponentText +import net.minecraft.util.IChatComponent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.LinkedList import java.util.Queue @@ -105,11 +106,15 @@ object ChatUtils { } } + fun chatComponent(message: IChatComponent) { + internalChat(message) + } + private fun internalChat(message: String): Boolean { return internalChat(ChatComponentText(message)) } - private fun internalChat(message: ChatComponentText): Boolean { + private fun internalChat(message: IChatComponent): Boolean { val formattedMessage = message.formattedText log.log(formattedMessage) |