From c56059b6c9d28d17d82de090c5a0b9d9382cb82c Mon Sep 17 00:00:00 2001 From: inglettronald Date: Sun, 23 Jul 2023 21:47:02 -0500 Subject: Chat stacking with lots of refactor --- src/main/kotlin/com/dulkirfabric/util/ActionBarUtil.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/kotlin/com/dulkirfabric/util') diff --git a/src/main/kotlin/com/dulkirfabric/util/ActionBarUtil.kt b/src/main/kotlin/com/dulkirfabric/util/ActionBarUtil.kt index 4970ba8..b5397b5 100644 --- a/src/main/kotlin/com/dulkirfabric/util/ActionBarUtil.kt +++ b/src/main/kotlin/com/dulkirfabric/util/ActionBarUtil.kt @@ -28,12 +28,12 @@ object ActionBarUtil { val sb = StringBuilder() var stackFlag = false event.message.formattedString().split(splitRegex).forEach { - healthRegex.matchEntire(TextUtils.stripColorCodes(it)) ?.let { result -> + healthRegex.matchEntire(TextUtils.stripColorCodes(it))?.let { result -> healthInt = result.groupValues[1].replace(",", "").toInt() healthStr = it return@forEach } - defRegex.matchEntire(TextUtils.stripColorCodes(it)) ?.let { result -> + defRegex.matchEntire(TextUtils.stripColorCodes(it))?.let { result -> defInt = result.groupValues[1].replace(",", "").toInt() defStr = it.replace(" Defense", "") return@forEach -- cgit