diff options
author | sayomaki <sayomayomaki@gmail.com> | 2024-07-15 22:44:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-15 16:44:38 +0200 |
commit | a716e5d26a6ae6c79300c298c221382fb73e21a8 (patch) | |
tree | 3533f6aaf4f2596856b33d26776f8b89e6d4c0e2 /src/main/java | |
parent | dd20c1273715e5b28df263bb896b1d35cfefa0f2 (diff) | |
download | skyhanni-a716e5d26a6ae6c79300c298c221382fb73e21a8.tar.gz skyhanni-a716e5d26a6ae6c79300c298c221382fb73e21a8.tar.bz2 skyhanni-a716e5d26a6ae6c79300c298c221382fb73e21a8.zip |
Fix: Buying items may incorrectly trigger compact hoppity messages (#2201)
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt index a74338d77..f9a25f3d5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt @@ -87,8 +87,10 @@ object HoppityEggsCompactChat { } HoppityEggsManager.eggBoughtPattern.matchMatcher(event.message) { - rabbitBought = true - compactChat(event) + if (group("rabbitname").equals(lastName)) { + rabbitBought = true + compactChat(event) + } } HoppityEggsManager.rabbitFoundPattern.matchMatcher(event.message) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt index 5e51a7693..86213e88b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt @@ -49,7 +49,7 @@ object HoppityEggsManager { */ val eggBoughtPattern by ChocolateFactoryAPI.patternGroup.pattern( "egg.bought", - "§aYou bought §r§.(?<rabbitname>.*?) §r§afor §r§6((\\d|,)*) Coins§r§a!", + "§aYou bought §r(?<rabbitname>.*?) §r§afor §r§6((\\d|,)*) Coins§r§a!", ) /** |