From ef11dd51a61d25bc8722cc844358869b00a5369c Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sun, 8 Dec 2024 03:42:07 +0100 Subject: feat: Add query command --- src/main/kotlin/moe/nea/ledger/LedgerLogger.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/kotlin/moe/nea/ledger/LedgerLogger.kt') diff --git a/src/main/kotlin/moe/nea/ledger/LedgerLogger.kt b/src/main/kotlin/moe/nea/ledger/LedgerLogger.kt index fd439c9..5005040 100644 --- a/src/main/kotlin/moe/nea/ledger/LedgerLogger.kt +++ b/src/main/kotlin/moe/nea/ledger/LedgerLogger.kt @@ -9,6 +9,7 @@ import moe.nea.ledger.events.ChatReceived import moe.nea.ledger.utils.Inject import net.minecraft.client.Minecraft import net.minecraft.util.ChatComponentText +import net.minecraft.util.IChatComponent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent import java.io.File @@ -17,8 +18,9 @@ import java.util.Date import java.util.UUID class LedgerLogger { - fun printOut(text: String) { - Minecraft.getMinecraft().ingameGUI?.chatGUI?.printChatMessage(ChatComponentText(text)) + fun printOut(text: String) = printOut(ChatComponentText(text)) + fun printOut(comp: IChatComponent) { + Minecraft.getMinecraft().ingameGUI?.chatGUI?.printChatMessage(comp) } val profileIdPattern = -- cgit