diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt | 53 |
1 files changed, 27 insertions, 26 deletions
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 fca2582c9..bc14934ab 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt @@ -46,7 +46,7 @@ object ChatFilter { private val lobbyMessages = listOf( // prototype - " §r§f§l➤ §r§6You have reached your Hype limit! Add Hype to Prototype Lobby minigames by right-clicking with the Hype Diamond!" + " §r§f§l➤ §r§6You have reached your Hype limit! Add Hype to Prototype Lobby minigames by right-clicking with the Hype Diamond!", ) private val lobbyMessagesContains = listOf( // prototype @@ -58,7 +58,7 @@ object ChatFilter { "§r§e§6§lHYPIXEL§e is hosting a §b§lTNT RUN§e tournament!", // other - "§aYou are still radiating with §bGenerosity§r§a!" + "§aYou are still radiating with §bGenerosity§r§a!", ) // Warping @@ -68,40 +68,40 @@ object ChatFilter { "§7Request join for Dungeon Hub #(.*)\\.\\.\\.".toPattern(), // warp portals on public islands // (canvas room – flower house, election room – community center, void sepulchre – the end) - "§dWarped to (.*)§r§d!".toPattern() + "§dWarped to (.*)§r§d!".toPattern(), ) private val warpingMessages = listOf( "§7Warping...", "§7Warping you to your SkyBlock island...", "§7Warping using transfer token...", // visiting other players - "§7Finding player...", "§7Sending a visit request..." + "§7Finding player...", "§7Sending a visit request...", ) // Welcome private val welcomeMessages = listOf( - "§eWelcome to §r§aHypixel SkyBlock§r§e!" + "§eWelcome to §r§aHypixel SkyBlock§r§e!", ) // Guild EXP private val guildExpPatterns = listOf( // §aYou earned §r§22 GEXP §r§afrom playing SkyBlock! // §aYou earned §r§22 GEXP §r§a+ §r§c210 Event EXP §r§afrom playing SkyBlock! - "§aYou earned §r§2.* GEXP (§r§a\\+ §r§.* Event EXP )?§r§afrom playing SkyBlock!".toPattern() + "§aYou earned §r§2.* GEXP (§r§a\\+ §r§.* Event EXP )?§r§afrom playing SkyBlock!".toPattern(), ) // Kill Combo private val killComboPatterns = listOf( //§a§l+5 Kill Combo §r§8+§r§b3% §r§b? Magic Find "§.§l\\+(.*) Kill Combo (.*)".toPattern(), - "§cYour Kill Combo has expired! You reached a (.*) Kill Combo!".toPattern() + "§cYour Kill Combo has expired! You reached a (.*) Kill Combo!".toPattern(), ) private val killComboMessages = listOf( - "§6§l+50 Kill Combo" + "§6§l+50 Kill Combo", ) // Profile Join private val profileJoinMessageStartsWith = listOf( - "§aYou are playing on profile: §e", "§8Profile ID: " + "§aYou are playing on profile: §e", "§8Profile ID: ", ) // OTHERS @@ -127,7 +127,7 @@ object ChatFilter { // Bank "§8Depositing coins...", - "§8Withdrawing coins..." + "§8Withdrawing coins...", ) // Slayer @@ -139,13 +139,13 @@ object ChatFilter { // end " {2}§r§a§lSLAYER QUEST COMPLETE!".toPattern(), " {3}§r§e(.*)Slayer LVL 9 §r§5- §r§a§lLVL MAXED OUT!".toPattern(), - " {3}§r§5§l» §r§7Talk to Maddox to claim your (.*) Slayer XP!".toPattern() + " {3}§r§5§l» §r§7Talk to Maddox to claim your (.*) Slayer XP!".toPattern(), ) private val slayerMessages = listOf( - " §r§6§lNICE! SLAYER BOSS SLAIN!", "§eYou received kill credit for assisting on a slayer miniboss!" + " §r§6§lNICE! SLAYER BOSS SLAIN!", "§eYou received kill credit for assisting on a slayer miniboss!", ) private val slayerMessageStartWith = listOf( - "§e✆ RING... " + "§e✆ RING... ", ) // Slayer Drop @@ -183,7 +183,7 @@ object ChatFilter { // Blaze "§9§lVERY RARE DROP! {2}§r§7\\(§r§f§r§fWisp's Ice-Flavored Water I Splash Potion§r§7\\) (.*)".toPattern(), "§b§lRARE DROP! §r§7\\(§r§f§r§5Bundle of Magma Arrows§r§7\\) (.*)".toPattern(), - "§9§lVERY RARE DROP! {2}§r§7\\(§r§f§r§7\\d+x §r§f§r§9(Glowstone|Blaze Rod|Magma Cream|Nether Wart) Distillate§r§7\\) (.*)".toPattern() + "§9§lVERY RARE DROP! {2}§r§7\\(§r§f§r§7\\d+x §r§f§r§9(Glowstone|Blaze Rod|Magma Cream|Nether Wart) Distillate§r§7\\) (.*)".toPattern(), ) // Useless Drop @@ -193,7 +193,7 @@ object ChatFilter { "§6§lRARE DROP! §r§fPotato (.*)".toPattern(), "§6§lRARE DROP! §r§9Machine Gun Bow (.*)".toPattern(), "§6§lRARE DROP! §r§5Earth Shard (.*)".toPattern(), - "§6§lRARE DROP! §r§5Zombie Lord Chestplate (.*)".toPattern() + "§6§lRARE DROP! §r§5Zombie Lord Chestplate (.*)".toPattern(), ) private val uselessDropMessages = listOf( "§6§lRARE DROP! §r§aEnchanted Ender Pearl", @@ -203,7 +203,7 @@ object ChatFilter { // Useless Notification private val uselessNotificationPatterns = listOf( - "§aYou tipped \\d+ players? in \\d+(?: different)? games?!".toPattern() + "§aYou tipped \\d+ players? in \\d+(?: different)? games?!".toPattern(), ) private val uselessNotificationMessages = listOf( "§eYour previous §r§6Plasmaflux Power Orb §r§ewas removed!", @@ -256,7 +256,7 @@ object ChatFilter { private val annoyingSpamPatterns = listOf( "§7Your Implosion hit (.*) for §r§c(.*) §r§7damage.".toPattern(), "§7Your Molten Wave hit (.*) for §r§c(.*) §r§7damage.".toPattern(), - "§cYou need a tool with a §r§aBreaking Power §r§cof §r§6(\\d)§r§c to mine (.*)§r§c! Speak to §r§dFragilis §r§cby the entrance to the Crystal Hollows to learn more!".toPattern() + "§cYou need a tool with a §r§aBreaking Power §r§cof §r§6(\\d)§r§c to mine (.*)§r§c! Speak to §r§dFragilis §r§cby the entrance to the Crystal Hollows to learn more!".toPattern(), ) private val annoyingSpamMessages = listOf( "§cThere are blocks in the way!", @@ -283,12 +283,12 @@ object ChatFilter { */ private val anitaFortunePattern by RepoPattern.pattern( "chat.jacobevent.accessory", - "§e\\[NPC] Jacob§f: §rYour §9Anita's \\w+ §fis giving you §6\\+\\d{1,2}☘ .+ Fortune §fduring the contest!" + "§e\\[NPC] Jacob§f: §rYour §9Anita's \\w+ §fis giving you §6\\+\\d{1,2}☘ .+ Fortune §fduring the contest!", ) private val skymallPerkPattern by RepoPattern.pattern( "chat.skymall.perk", - "§eNew buff§r§r§r:(.*)" + "§eNew buff§r§r§r:(.*)", ) // Winter Gift @@ -340,7 +340,7 @@ object ChatFilter { private val fireSalePattern by RepoPattern.pattern( "chat.firesale", - "§6§k§lA§r §c§lFIRE SALE §r§6§k§lA(?:\\n|.)*" + "§6§k§lA§r §c§lFIRE SALE §r§6§k§lA(?:\\n|.)*", ) private val fireSalePatterns = listOf( "§c♨ §eFire Sales for .* §eare starting soon!".toPattern(), @@ -361,13 +361,14 @@ object ChatFilter { "§7You will now produce §r§6.* Chocolate §r§7per click!".toPattern(), "§7You upgraded to §r§d.*?§r§7!".toPattern(), ) + /** * REGEX-TEST: §c§lSACRIFICE! §r§6[MVP§r§d++§r§6] Mikecraft1224§r§f §r§eturned §r§6Young Dragon Boots §r§einto §r§d40 Dragon Essence§r§e! * REGEX-TEST: §c§lBONUS LOOT! §r§eThey also received §r§5Ritual Residue §r§efrom their sacrifice! */ private val sacrificePatterns = listOf( "§c§lSACRIFICE! (.*) §r§eturned (.*) §r§einto (.*) Dragon Essence§r§e!".toPattern(), - "§c§lBONUS LOOT! §r§eThey also received (.*) §r§efrom their sacrifice!".toPattern() + "§c§lBONUS LOOT! §r§eThey also received (.*) §r§efrom their sacrifice!".toPattern(), ) private val powderMiningMessages = listOf( "§aYou uncovered a treasure chest!", @@ -390,28 +391,28 @@ object ChatFilter { * REGEX-TEST: §6§lRARE REWARD! §r§bLeebys §r§efound a §r§6Recombobulator 3000 §r§ein their Obsidian Chest§r§e! */ private val rareDropsMessages = listOf( - "§6§lRARE REWARD! (.*) §r§efound a (.*) §r§ein their (.*) Chest§r§e!".toPattern() + "§6§lRARE REWARD! (.*) §r§efound a (.*) §r§ein their (.*) Chest§r§e!".toPattern(), ) // &r&6Your &r&aMage &r&6stats are doubled because you are the only player using this class!&r private val soloClassPatterns = listOf( - "§6Your §r§a(Healer|Mage|Berserk|Archer|Tank) §r§6stats are doubled because you are the only player using this class!".toPattern() + "§6Your §r§a(Healer|Mage|Berserk|Archer|Tank) §r§6stats are doubled because you are the only player using this class!".toPattern(), ) private val soloStatsPatterns = listOf( - "§a\\[(Healer|Mage|Berserk|Archer|Tank)].*".toPattern() + "§a\\[(Healer|Mage|Berserk|Archer|Tank)].*".toPattern(), ) // &r&dGenevieve the Fairy&r&f: You killed me! Take this &r&6Revive Stone &r&fso that my death is not in vain!&r private val fairyPatterns = listOf( "§d[\\w']+ the Fairy§r§f: You killed me! Take this §r§6Revive Stone §r§fso that my death is not in vain!".toPattern(), "§d[\\w']+ the Fairy§r§f: You killed me! I'll revive you so that my death is not in vain!".toPattern(), - "§d[\\w']+ the Fairy§r§f: Have a great life!".toPattern() + "§d[\\w']+ the Fairy§r§f: Have a great life!".toPattern(), ) // §e§ka§a>> §aAchievement Unlocked: §6§r§6Agile§r§a <<§e§ka private val achievementGetPatterns = listOf( - "§e§k.§a>> {3}§aAchievement Unlocked: .* {3}<<§e§k.".toPattern() + "§e§k.§a>> {3}§aAchievement Unlocked: .* {3}<<§e§k.".toPattern(), ) private val patternsMap: Map<String, List<Pattern>> = mapOf( |