aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/util/skyblock
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/util/skyblock')
-rw-r--r--src/main/kotlin/util/skyblock/SackUtil.kt7
-rw-r--r--src/main/kotlin/util/skyblock/SkyBlockItems.kt10
2 files changed, 16 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(
diff --git a/src/main/kotlin/util/skyblock/SkyBlockItems.kt b/src/main/kotlin/util/skyblock/SkyBlockItems.kt
new file mode 100644
index 0000000..c94ebfe
--- /dev/null
+++ b/src/main/kotlin/util/skyblock/SkyBlockItems.kt
@@ -0,0 +1,10 @@
+package moe.nea.firmament.util.skyblock
+
+import moe.nea.firmament.util.SkyblockId
+
+object SkyBlockItems {
+ val ROTTEN_FLESH = SkyblockId("ROTTEN_FLESH")
+ val ENCHANTED_DIAMOND = SkyblockId("ENCHANTED_DIAMOND")
+ val DIAMOND = SkyblockId("DIAMOND")
+ val ANCESTRAL_SPADE = SkyblockId("ANCESTRAL_SPADE")
+}