aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-04-18 13:25:38 +0200
committerLinnea Gräf <nea@nea.moe>2024-04-18 13:25:38 +0200
commitc405a779bb12dd8e07d85623ce5e1e2ad903afe1 (patch)
tree1ed2f5ff65dbe996c58f57e64ee99c4216714246 /src/main/kotlin/moe/nea
parente1e67eb83e2ae35e770fb0612a4b99dd29f869da (diff)
downloadmoney-ledger-c405a779bb12dd8e07d85623ce5e1e2ad903afe1.tar.gz
money-ledger-c405a779bb12dd8e07d85623ce5e1e2ad903afe1.tar.bz2
money-ledger-c405a779bb12dd8e07d85623ce5e1e2ad903afe1.zip
Add dungeon chest opening event
Diffstat (limited to 'src/main/kotlin/moe/nea')
-rw-r--r--src/main/kotlin/moe/nea/ledger/ItemUtil.kt7
-rw-r--r--src/main/kotlin/moe/nea/ledger/Ledger.kt1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/ledger/ItemUtil.kt b/src/main/kotlin/moe/nea/ledger/ItemUtil.kt
index 7157386..892127d 100644
--- a/src/main/kotlin/moe/nea/ledger/ItemUtil.kt
+++ b/src/main/kotlin/moe/nea/ledger/ItemUtil.kt
@@ -19,3 +19,10 @@ fun ItemStack.getLore(): List<String> {
return (0 until lore.tagCount()).map { lore.getStringTagAt(it) }
}
+
+fun ItemStack.getDisplayNameU(): String {
+ val nbt = this.tagCompound ?: NBTTagCompound()
+ val extraAttributes = nbt.getCompoundTag("display")
+ return extraAttributes.getString("Name")
+}
+
diff --git a/src/main/kotlin/moe/nea/ledger/Ledger.kt b/src/main/kotlin/moe/nea/ledger/Ledger.kt
index bf3ac9e..3745f36 100644
--- a/src/main/kotlin/moe/nea/ledger/Ledger.kt
+++ b/src/main/kotlin/moe/nea/ledger/Ledger.kt
@@ -56,6 +56,7 @@ class Ledger {
ledger,
BankDetection(ledger),
BazaarDetection(ledger, ids),
+ DungeonChestDetection(ledger),
BazaarOrderDetection(ledger, ids),
AuctionHouseDetection(ledger, ids),
BitsDetection(ledger),