diff options
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 |