diff options
Diffstat (limited to 'src/main/java/org/polyfrost/chatting/hook')
-rw-r--r-- | src/main/java/org/polyfrost/chatting/hook/ChatLineHook.java | 17 | ||||
-rw-r--r-- | src/main/java/org/polyfrost/chatting/hook/GuiNewChatHook.java | 21 |
2 files changed, 38 insertions, 0 deletions
diff --git a/src/main/java/org/polyfrost/chatting/hook/ChatLineHook.java b/src/main/java/org/polyfrost/chatting/hook/ChatLineHook.java new file mode 100644 index 0000000..50b9ce3 --- /dev/null +++ b/src/main/java/org/polyfrost/chatting/hook/ChatLineHook.java @@ -0,0 +1,17 @@ +package org.polyfrost.chatting.hook; + +import net.minecraft.client.gui.ChatLine; +import net.minecraft.client.network.NetworkPlayerInfo; + +import java.lang.ref.WeakReference; +import java.util.HashSet; + +public interface ChatLineHook { + HashSet<WeakReference<ChatLine>> chatLines = new HashSet<>(); + boolean hasDetected(); + NetworkPlayerInfo getPlayerInfo(); + + void updatePlayerInfo(); + + long getUniqueId(); +} diff --git a/src/main/java/org/polyfrost/chatting/hook/GuiNewChatHook.java b/src/main/java/org/polyfrost/chatting/hook/GuiNewChatHook.java new file mode 100644 index 0000000..84097bd --- /dev/null +++ b/src/main/java/org/polyfrost/chatting/hook/GuiNewChatHook.java @@ -0,0 +1,21 @@ +package org.polyfrost.chatting.hook; + +import net.minecraft.client.gui.ChatLine; + +import java.awt.datatransfer.Transferable; + +public interface GuiNewChatHook { + int getRight(); + + boolean isHovering(); + + ChatLine getHoveredLine(int mouseY); + + Transferable getChattingChatComponent(int mouseY); + + default ChatLine getFullMessage(ChatLine line) { + throw new AssertionError("getFullMessage not overridden on GuiNewChat"); + } + + int getTextOpacity(); +} |