From 59d9f38e0916ffd93a28a26ed90ac054142ad6f5 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 18 Jan 2023 12:13:28 +0100 Subject: Added Shark Fish Counter. --- src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main/java/at/hannibal2/skyhanni/data') diff --git a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt index 95d9aff04..95572c213 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt @@ -3,6 +3,8 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.events.LorenzActionBarEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.PacketEvent +import at.hannibal2.skyhanni.events.SeaCreatureFishEvent +import at.hannibal2.skyhanni.features.fishing.SeaCreatureManager import at.hannibal2.skyhanni.utils.LorenzLogger import at.hannibal2.skyhanni.utils.LorenzUtils import net.minecraft.network.play.server.S02PacketChat @@ -63,4 +65,12 @@ class ChatManager { loggerModified.log("[modified] " + modified.formattedText) } } + + @SubscribeEvent + fun onChatMessage(chatEvent: LorenzChatEvent) { + if (!LorenzUtils.inSkyBlock) return + + val seaCreature = SeaCreatureManager.getSeaCreature(chatEvent.message) ?: return + SeaCreatureFishEvent(seaCreature, chatEvent).postAndCatch() + } } \ No newline at end of file -- cgit