diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-31 19:03:41 +0100 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-31 19:03:41 +0100 |
| commit | d58dfb57cc78d0a73b81a58e01b6e17899355924 (patch) | |
| tree | ba7cab54fa94b03669b8571655147780f72d4279 | |
| parent | fe00857ce42a8b829d72b2515c4f940c68c67a19 (diff) | |
| download | skyhanni-d58dfb57cc78d0a73b81a58e01b6e17899355924.tar.gz skyhanni-d58dfb57cc78d0a73b81a58e01b6e17899355924.tar.bz2 skyhanni-d58dfb57cc78d0a73b81a58e01b6e17899355924.zip | |
replace onChatMessage with onChat
38 files changed, 40 insertions, 41 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index 0ba26998a..78017b7bc 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -95,7 +95,7 @@ class HypixelData { } @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!LorenzUtils.onHypixel) return val message = event.message.removeColor().lowercase() diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt index 91e7a1745..eb130b06b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt @@ -20,7 +20,7 @@ class CompactBingoChat { // TODO USE SH-REPO @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!config.enabled) return if (!LorenzUtils.isBingoProfile && !config.outsideBingo) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt index ac0d3a6b8..2c0437e01 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt @@ -364,7 +364,7 @@ class ChatFilter { /// </editor-fold> @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { val blockReason = block(event.message) if (blockReason == "") return diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt index 48d8b0e8c..1399ae216 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt @@ -23,7 +23,7 @@ class CompactBestiaryChatMessage { private val milestonePattern = "^.+(§8\\d{1,3}➡§e\\d{1,3})$".toRegex() @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!LorenzUtils.inSkyBlock) return if (!SkyHanniMod.feature.chat.compactBestiaryMessage) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactSplashPotionMessage.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactSplashPotionMessage.kt index cf81e82c6..4cd9e757d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactSplashPotionMessage.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactSplashPotionMessage.kt @@ -24,7 +24,7 @@ class CompactSplashPotionMessage { ) @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!isEnabled()) return if (!event.message.isPotionMessage()) return event.blockedReason = "compact_potion_effect" diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt index 342550a17..0c20c849f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt @@ -31,7 +31,7 @@ class PlayerDeathMessages { } @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!LorenzUtils.inSkyBlock) return val message = event.message diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/WatchdogHider.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/WatchdogHider.kt index c5eefc603..f70c10ea0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/WatchdogHider.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/WatchdogHider.kt @@ -15,7 +15,7 @@ class WatchdogHider { private var startLineComponent: IChatComponent? = null @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!LorenzUtils.onHypixel || !SkyHanniMod.feature.chat.filterType.watchDog) return when (event.message) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt index dc00b93ef..3e6b2e6da 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt @@ -118,7 +118,7 @@ class DamageIndicatorManager { } @SubscribeEvent(receiveCanceled = true) - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { mobFinder?.handleChat(event.message) } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt index af3518141..f9403af94 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt @@ -135,7 +135,7 @@ class DungeonAPI { } @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { val floor = dungeonFloor if (floor != null) { if (event.message == "§e[NPC] §bMort§f: §rHere, I found this map when I first entered the dungeon.") { diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt index 86d64b416..51ee98029 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt @@ -44,7 +44,7 @@ class DungeonBossMessages { ) @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!LorenzUtils.inDungeons) return if (!isBoss(event.message)) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt index 3a29ac603..a133cb6be 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt @@ -190,7 +190,7 @@ class DungeonChatFilter { /// </editor-fold> @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!LorenzUtils.onHypixel || config.dungeonFilteredMessageTypes.isEmpty()) return // Workaround since the potion message gets always sent at that moment when SkyBlock is set as false diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt index 06f43c51f..4ee2c8761 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt @@ -31,7 +31,7 @@ class DungeonCleanEnd { private var lastBossId: Int = -1 @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!LorenzUtils.inDungeons) return if (!config.enabled) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt index 1dcc92dab..32ee7cebe 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt @@ -32,7 +32,7 @@ class DungeonCopilot { private var searchForKey = false @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!isEnabled()) return copilot(event.message)?.let { diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt index 36c9f780d..a3381744c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt @@ -29,7 +29,7 @@ class DungeonHighlightClickedBlocks { } @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!SkyHanniMod.feature.dungeon.highlightClickedBlocks) return if (!LorenzUtils.inDungeons) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt index 23bd9c86d..c6b772d6c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt @@ -134,7 +134,7 @@ object GriffinBurrowHelper { } @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!isEnabled()) return if (event.message.startsWith("§c ☠ §r§7You were killed by §r")) { particleBurrows = particleBurrows.editCopy { keys.removeIf { this[it] == BurrowType.MOB } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt index bbe17408f..f21b808b2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt @@ -127,7 +127,7 @@ class GriffinBurrowParticleFinder { } @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!isEnabled()) return if (!config.burrowsSoopyGuess) return val message = event.message diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt index f8469f83f..d7a161957 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt @@ -79,7 +79,7 @@ object InquisitorWaypointShare { } @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!isEnabled()) return val message = event.message if (message.contains("§eYou dug out")) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/winter/NewYearCakeReminder.kt b/src/main/java/at/hannibal2/skyhanni/features/event/winter/NewYearCakeReminder.kt index d9c9be396..0198c96b3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/winter/NewYearCakeReminder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/winter/NewYearCakeReminder.kt @@ -26,7 +26,7 @@ class NewYearCakeReminder { private var lastReminderSend = SimpleTimeMark.farPast() @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (event.message == "§aYou claimed a §r§cNew Year Cake§r§a!") { makedClaimed() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureManager.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureManager.kt index 022e9d302..5843bb97c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureManager.kt @@ -13,7 +13,7 @@ class SeaCreatureManager { private var doubleHook = false @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!LorenzUtils.inSkyBlock) return if (doubleHookMessages.contains(event.message)) { if (SkyHanniMod.feature.fishing.compactDoubleHook) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt index 6e98cd134..f84a72d53 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt @@ -45,7 +45,7 @@ class SharkFishCounter { } @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (event.message != "§b§lFISHING FESTIVAL §r§eThe festival has concluded! Time to dry off and repair your rods!") return val count = counter.sum() if (count == 0) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt index b75929edb..495d82bb6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt @@ -12,7 +12,6 @@ import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNecessary import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import java.util.regex.Pattern class GardenCropMilestoneFix { private val tabListPattern = " Milestone: §r§a(?<crop>.*) (?<tier>.*): §r§3(?<percentage>.*)%".toPattern() @@ -21,7 +20,7 @@ class GardenCropMilestoneFix { private val tabListCropProgress = mutableMapOf<CropType, Long>() @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { levelUpPattern.matchMatcher(event.message) { val cropName = group("crop") val crop = CropType.getByNameOrNull(cropName) ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt index d2772d837..f674340d7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt @@ -31,7 +31,7 @@ class GardenLevelDisplay { } @SubscribeEvent(receiveCanceled = true) - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!GardenAPI.inGarden()) return visitorRewardPattern.matchMatcher(event.message) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WrongFungiCutterWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WrongFungiCutterWarning.kt index bea0d4b92..aeae6de44 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WrongFungiCutterWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WrongFungiCutterWarning.kt @@ -18,7 +18,7 @@ class WrongFungiCutterWarning { private var lastPlaySoundTime = 0L @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { val message = event.message if (message == "§eFungi Cutter Mode: §r§cRed Mushrooms") { mode = FungiMode.RED diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt index 1ab640b2d..d9eb440e8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt @@ -454,7 +454,7 @@ class GardenVisitorFeatures { } @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (config.hypixelArrivedMessage && newVisitorArrivedMessage.matcher(event.message).matches()) { event.blockedReason = "new_visitor_arrived" } diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayWaypoints.kt index 4fa33ad2b..a3a5014c3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayWaypoints.kt @@ -22,7 +22,7 @@ class TiaRelayWaypoints { } @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.nextWaypoint) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt index 639693afb..5f096eccc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt @@ -34,7 +34,7 @@ class ChickenHeadTimer { } @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!isEnabled()) return if (!hasChickenHead) return if (event.message == "§aYou laid an egg!") { diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt index ffb457ebf..db8fb5f31 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt @@ -308,7 +308,7 @@ class ItemAbilityCooldown { private fun ItemStack.getIdentifier() = getItemUuid() ?: getItemId() @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!isEnabled()) return val message = event.message diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt index f5552701e..7cd0d7c9e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt @@ -255,7 +255,7 @@ class MinionFeatures { } @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!enable()) return val message = event.message diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt index 4b4d39816..d4cc01fbd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt @@ -25,7 +25,7 @@ class CurrentPetDisplay { private val chatPetRulePattern = "§cAutopet §eequipped your §7\\[Lvl .*] (?<pet>.*)! §a§lVIEW RULE".toPattern() @SubscribeEvent - fun onChatMessage(event: LorenzChatEvent |
