diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt | 1 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index 4c73c6113..e83a14c5c 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -50,6 +50,7 @@ object Commands { ConfigGuiManager.openConfigGui(it.joinToString(" ")) } } else { + val arr = mutableListOf<String>() ConfigGuiManager.openConfigGui() } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt index f9566cdf1..8f346ddea 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt @@ -11,6 +11,7 @@ import net.minecraft.client.gui.GuiUtilRenderComponents import net.minecraft.client.gui.ScaledResolution import net.minecraft.client.renderer.GlStateManager import net.minecraft.util.IChatComponent +import org.lwjgl.input.Keyboard import org.lwjgl.input.Mouse class ChatFilterGui(private val history: List<ChatManager.MessageFilteringResult>) : GuiScreen() { @@ -63,8 +64,13 @@ class ChatFilterGui(private val history: List<ChatManager.MessageFilteringResult ) } if (mouseX in 0..w && mouseY in 0..(size * 10) && (isMouseButtonDown && !wasMouseButtonDown)) { - OSUtils.copyToClipboard(msg.message.formattedText) - LorenzUtils.chat("Copied to clipboard") + if (LorenzUtils.isShiftKeyDown()) { + OSUtils.copyToClipboard(IChatComponent.Serializer.componentToJson(msg.message)) + LorenzUtils.chat("Copied structured chat line to clipboard") + } else { + OSUtils.copyToClipboard(msg.message.formattedText) + LorenzUtils.chat("Copied chat line to clipboard") + } } mouseY -= size * 10 } |