aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-05-26 15:14:28 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-05-26 15:14:28 +0200
commit6396e78aef1b0e712968931b78d422deae3e08b0 (patch)
treefedd2806132dfb241a69a47b574c96ac325c359e /src/main/java/at/hannibal2/skyhanni
parentea2cb47c07628abeace3b2d4ac4b3f16b88e382a (diff)
downloadskyhanni-6396e78aef1b0e712968931b78d422deae3e08b0.tar.gz
skyhanni-6396e78aef1b0e712968931b78d422deae3e08b0.tar.bz2
skyhanni-6396e78aef1b0e712968931b78d422deae3e08b0.zip
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt5
1 files changed, 2 insertions, 3 deletions
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)
}
}