diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-08-02 11:07:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-02 11:07:37 +0200 |
commit | ccdca342626e439f410f1de4bd5dc1a1790605f3 (patch) | |
tree | cf96bddf622411469d9b1e506cd402b67f4b382e /src/main/java/at/hannibal2/skyhanni/features | |
parent | 171049f66ed122656c44e9c07eecc099fe8c6b99 (diff) | |
download | skyhanni-ccdca342626e439f410f1de4bd5dc1a1790605f3.tar.gz skyhanni-ccdca342626e439f410f1de4bd5dc1a1790605f3.tar.bz2 skyhanni-ccdca342626e439f410f1de4bd5dc1a1790605f3.zip |
Fix: Odin Truffle (#2300)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/HeldTimeInLore.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HeldTimeInLore.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HeldTimeInLore.kt index 6b2f97fbd..327e38aab 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HeldTimeInLore.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HeldTimeInLore.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.inventory import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule +import at.hannibal2.skyhanni.utils.CollectionUtils.addOrInsert import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName @@ -28,7 +29,7 @@ object HeldTimeInLore { val seconds = event.itemStack.getSeconds() ?: return val formatted = seconds.seconds.format() - event.toolTip.add(10, "§7Time Held: §b$formatted") + event.toolTip.addOrInsert(10, "§7Time Held: §b$formatted") } private fun ItemStack.getSeconds(): Int? = when (getInternalName()) { @@ -37,3 +38,5 @@ object HeldTimeInLore { else -> null } } + + |