From 6396e78aef1b0e712968931b78d422deae3e08b0 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 26 May 2024 15:14:28 +0200 Subject: code cleanup --- src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt index 40ef1399a..112c29f17 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt @@ -13,6 +13,7 @@ import at.hannibal2.skyhanni.utils.ReflectionUtils.getClassInstance import at.hannibal2.skyhanni.utils.ReflectionUtils.getModContainer import at.hannibal2.skyhanni.utils.ReflectionUtils.makeAccessible import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import at.hannibal2.skyhanni.utils.chat.Text.send import net.minecraft.client.Minecraft import net.minecraft.client.gui.ChatLine import net.minecraft.client.gui.GuiNewChat @@ -152,9 +153,7 @@ object ChatManager { // TODO: Handle this with ChatManager.retractMessage or some other way for logging and /shchathistory purposes? if (chatEvent.chatLineId != 0) { event.isCanceled = true - Minecraft.getMinecraft().ingameGUI.chatGUI.printChatMessageWithOptionalDeletion( - event.message, chatEvent.chatLineId - ) + event.message.send(chatEvent.chatLineId) } } -- cgit