diff options
author | Vixid <52578495+VixidDev@users.noreply.github.com> | 2024-04-25 08:43:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-25 09:43:01 +0200 |
commit | f3b3b44296b8a6ac77ecad433ca28e7a03a9eaf2 (patch) | |
tree | 4a1e45727434c16489c748fad7eefe4117be5875 /src/main/java/at/hannibal2/skyhanni/events | |
parent | ed53f750e6b68067f58a5e706db220760d57029f (diff) | |
download | skyhanni-f3b3b44296b8a6ac77ecad433ca28e7a03a9eaf2.tar.gz skyhanni-f3b3b44296b8a6ac77ecad433ca28e7a03a9eaf2.tar.bz2 skyhanni-f3b3b44296b8a6ac77ecad433ca28e7a03a9eaf2.zip |
Feature: SBA style Enchant Parsing (#654)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/events')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/events/ChatHoverEvent.kt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/events/ChatHoverEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/ChatHoverEvent.kt new file mode 100644 index 000000000..38118bac6 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/events/ChatHoverEvent.kt @@ -0,0 +1,17 @@ +package at.hannibal2.skyhanni.events + +import net.minecraft.event.HoverEvent +import net.minecraft.util.ChatComponentText + +/** + * This event is mainly used for doing things on chat hover and reading the chat component + * of the hovered chat. + * + * To edit the chat component, add to, or use methods in [GuiChatHook][at.hannibal2.skyhanni.mixins.hooks.GuiChatHook]. + * + * The edited chat component in [GuiChatHook][at.hannibal2.skyhanni.mixins.hooks.GuiChatHook] does not change the actual + * chat component, but rather makes a new one just before rendering. + */ +class ChatHoverEvent(val component: ChatComponentText) : LorenzEvent() { + fun getHoverEvent(): HoverEvent = component.chatStyle.chatHoverEvent +} |