diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-01-18 12:13:28 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-01-18 12:13:28 +0100 |
commit | 59d9f38e0916ffd93a28a26ed90ac054142ad6f5 (patch) | |
tree | 64c5d8b609d9e5e692a1e76be5ce211389a625ef /src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt | |
parent | 9d2361ec88296eab1e03bf4e944ef6b4f4e14b62 (diff) | |
download | skyhanni-59d9f38e0916ffd93a28a26ed90ac054142ad6f5.tar.gz skyhanni-59d9f38e0916ffd93a28a26ed90ac054142ad6f5.tar.bz2 skyhanni-59d9f38e0916ffd93a28a26ed90ac054142ad6f5.zip |
Added Shark Fish Counter.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt | 10 |
1 files changed, 10 insertions, 0 deletions
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 |