aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt
index 2b3efb6aa..e47daa4f2 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt
@@ -110,9 +110,6 @@ class PlayerChatManager {
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
val chatComponent = event.chatComponent
- globalPattern.matchMatcher(event.message) {
- if (isGlobalChat(event)) return
- }
partyPattern.matchMatcher(event.message) {
val author = group("author")
val message = group("message")
@@ -143,6 +140,10 @@ class PlayerChatManager {
// for consistency
val message = "§7$action §r$itemName"
PlayerShowItemChatEvent(levelColor, level, author, message, action, itemName, chatComponent).postChat(event)
+ return
+ }
+ globalPattern.matchMatcher(event.message) {
+ if (isGlobalChat(event)) return
}
sendSystemMessage(event)
@@ -150,11 +151,6 @@ class PlayerChatManager {
private fun Matcher.isGlobalChat(event: LorenzChatEvent): Boolean {
var author = group("author")
- // TODO move into regex
- val isGuild = author.startsWith("§2Guild >")
- val isParty = author.startsWith("§9Party")
- if (isGuild || isParty) return false
-
val message = LorenzUtils.stripVanillaMessage(group("message"))
if (author.contains("[NPC]")) {
NpcChatEvent(author, message.removePrefix("§f"), event.chatComponent).postChat(event)