diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt | 5 |
1 files changed, 3 insertions, 2 deletions
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 |