diff options
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/moe/nea/ledger/ItemUtil.kt | 7 | ||||
-rw-r--r-- | src/main/kotlin/moe/nea/ledger/Ledger.kt | 1 |
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), |