aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Chat.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt9
2 files changed, 14 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java b/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java
index 5ec5e018c..bd60e0eee 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java
@@ -77,6 +77,12 @@ public class Chat {
@ConfigAccordionId(id = 0)
public boolean watchDog = true;
+ @Expose
+ @ConfigOption(name = "Profile Join", desc = "Hide 'You are playing on profile' and 'Profile ID' chat messages")
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 0)
+ public boolean profileJoin = true;
+
//TODO remove
@Expose
@ConfigOption(name = "Others", desc = "Hide other annoying messages.")
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...",