From 82f13086d18b4119c7ed0375a4ae6d4c8dfe66f8 Mon Sep 17 00:00:00 2001 From: Rime <81419447+Emirlol@users.noreply.github.com> Date: Tue, 24 Dec 2024 07:18:34 +0300 Subject: [PATCH] Add more documentation --- src/main/java/de/hysky/skyblocker/events/ChatEvents.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/de/hysky/skyblocker/events/ChatEvents.java b/src/main/java/de/hysky/skyblocker/events/ChatEvents.java index 3753770fcd..2c50aeb056 100644 --- a/src/main/java/de/hysky/skyblocker/events/ChatEvents.java +++ b/src/main/java/de/hysky/skyblocker/events/ChatEvents.java @@ -5,12 +5,16 @@ import net.fabricmc.fabric.api.event.Event; import net.fabricmc.fabric.api.event.EventFactory; import net.minecraft.text.Text; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Environment(EnvType.CLIENT) public class ChatEvents { /** * This will be called when a game message is received, cancelled or not. + * + * @implNote Not fired when {@code overlay} is {@code true}. See {@link de.hysky.skyblocker.mixins.MessageHandlerMixin#skyblocker$monitorGameMessage(Text, boolean, CallbackInfo) the mixin} for more information. */ + @SuppressWarnings("JavadocReference") public static final Event RECEIVE_TEXT = EventFactory.createArrayBacked(ChatTextEvent.class, listeners -> message -> { for (ChatTextEvent listener : listeners) { listener.onMessage(message); @@ -20,7 +24,10 @@ public class ChatEvents { /** * This will be called when a game message is received, cancelled or not. * This method is called with the result of {@link Text#getString()} to avoid each listener having to call it. + * + * @implNote Not fired when {@code overlay} is {@code true}. See {@link de.hysky.skyblocker.mixins.MessageHandlerMixin#skyblocker$monitorGameMessage(Text, boolean, CallbackInfo) the mixin} for more information. */ + @SuppressWarnings("JavadocReference") public static final Event RECEIVE_STRING = EventFactory.createArrayBacked(ChatStringEvent.class, listeners -> message -> { for (ChatStringEvent listener : listeners) { listener.onMessage(message);