aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java
index 098eddea1..ed1a65661 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java
@@ -84,7 +84,7 @@ public class VisitorConfig {
public boolean hypixelArrivedMessage = true;
@Expose
- @ConfigOption(name = "Hide Chat", desc = "Hide chat messages from the visitors in the garden. (Except Beth, Jacob and Spaceman)")
+ @ConfigOption(name = "Hide Chat", desc = "Hide chat messages from the visitors in the garden. (Except Beth and Spaceman)")
@ConfigEditorBoolean
@FeatureToggle
public boolean hideChat = true;
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 82914c66f..f29fd4faf 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
@@ -89,7 +89,7 @@ class GardenVisitorFeatures {
)
private val visitorChatMessagePattern by patternGroup.pattern(
"visitorchat",
- "§e\\[NPC] (§.)?(?<name>.*)§f: §r.*"
+ "§e\\[NPC] (?<color>§.)?(?<name>.*)§f: §r.*"
)
private val partialAcceptedPattern by patternGroup.pattern(
"partialaccepted",
@@ -476,8 +476,10 @@ class GardenVisitorFeatures {
}
private fun hideVisitorMessage(message: String) = visitorChatMessagePattern.matchMatcher(message) {
+ val color = group("color")
+ if (color == null || color == "§e") return false // Non-visitor NPC, probably Jacob
+
val name = group("name")
- if (name == "Jacob") return false
if (name == "Spaceman") return false
if (name == "Beth") return false