From 71a4298a7b3770b238a84c0866b0ff0ce56f0578 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 18 May 2023 18:45:07 +0200 Subject: Added profile id chat hider --- src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/chat') 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 c106d5a2f..37b61d5a3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt @@ -28,8 +28,8 @@ class ChatFilter { friendJoin(message) && config.friendJoinLeft -> "friend_join" killCombo(message) && config.killCombo -> "kill_combo" watchdogAnnouncement(message) && config.watchDog -> "watchdog" + profileJoin(message) && config.profileJoin -> "profile_join" - message.startsWith("§aYou are playing on profile: §e") && config.others -> "profile"//TODO move into own class bazaarAndAHMiniMessages(message) && config.others -> "bz_ah_minis" slayer(message) && config.others -> "slayer" slayerDrop(message) && config.others -> "slayer_drop" @@ -227,6 +227,13 @@ class ChatFilter { else -> false } + private fun profileJoin(message: String) = when { + message.startsWith("§aYou are playing on profile: §e") -> true + message.startsWith("§8Profile ID: ") -> true + + else -> false + } + private fun bazaarAndAHMiniMessages(message: String) = when (message) { "§7Putting item in escrow...", "§7Putting coins in escrow...", -- cgit