diff options
Diffstat (limited to 'src/main/kotlin/util/skyblock/SackUtil.kt')
-rw-r--r-- | src/main/kotlin/util/skyblock/SackUtil.kt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/kotlin/util/skyblock/SackUtil.kt b/src/main/kotlin/util/skyblock/SackUtil.kt index 2679949..fd67c44 100644 --- a/src/main/kotlin/util/skyblock/SackUtil.kt +++ b/src/main/kotlin/util/skyblock/SackUtil.kt @@ -60,8 +60,13 @@ object SackUtil { @Subscribe fun updateFromChat(event: ProcessChatEvent) { if (!event.unformattedString.startsWith("[Sacks]")) return + getUpdatesFromMessage(event.text) + } + + fun getUpdatesFromMessage(text: Text): List<SackUpdate> { val update = ChatUpdate() - event.text.siblings.forEach(update::updateFromHoverText) + text.siblings.forEach(update::updateFromHoverText) + return update.updates } data class SackUpdate( |