diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/PlayerChatSymbols.kt | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PlayerChatSymbols.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PlayerChatSymbols.kt index 9492df47b..73cb02b5a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/PlayerChatSymbols.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PlayerChatSymbols.kt @@ -31,7 +31,7 @@ class PlayerChatSymbols { ) private val symbolPattern by patternGroup.pattern( "symbol", - "((?:§\\w)+\\S)" + "(?:§.)+(\\S)" ) @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt index a8ab6e6cd..f0456304e 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt @@ -249,8 +249,9 @@ object StringUtils { modifyFirstChatComponent(chatComponent) { component -> if (component is ChatComponentText) { component as AccessorChatComponentText - if (component.text_skyhanni().contains(toReplace)) { - component.setText_skyhanni(component.text_skyhanni().replace(toReplace, replacement)) + val componentText = component.text_skyhanni() + if (componentText.contains(toReplace)) { + component.setText_skyhanni(componentText.replace(toReplace, replacement)) return@modifyFirstChatComponent true } return@modifyFirstChatComponent false |