diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-12 16:23:33 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-12 16:23:33 +0200 |
commit | a6ce9c067db3f4ce7fed4dcefad79ff8b206fb5b (patch) | |
tree | 7b43c88debd03d3d4f198788d90af6fab11a70bb /src/main/java/at/hannibal2 | |
parent | 32ab6ef9c6a05298f681200ce01f8ffa56cabb18 (diff) | |
download | skyhanni-a6ce9c067db3f4ce7fed4dcefad79ff8b206fb5b.tar.gz skyhanni-a6ce9c067db3f4ce7fed4dcefad79ff8b206fb5b.tar.bz2 skyhanni-a6ce9c067db3f4ce7fed4dcefad79ff8b206fb5b.zip |
Added workaround for empty visitor description.
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt index ab13c2aec..f66a63f63 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt @@ -388,10 +388,15 @@ class GardenVisitorFeatures { val visitor = getVisitor(lastClickedNpc) ?: return - event.toolTip.let { - it.clear() - it.addAll(visitor.lastLore) + val toolTip = event.toolTip ?: return + toolTip.clear() + + if (visitor.lastLore.isEmpty()) { + readToolTip(visitor, event.itemStack) + LorenzUtils.chat("§e[SkyHanni] Reloaded the visitor data of that inventory, this should not happen.") } + + toolTip.addAll(visitor.lastLore) } private fun readToolTip(visitor: Visitor, itemStack: ItemStack?) { |