aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-12 16:23:33 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-12 16:23:33 +0200
commita6ce9c067db3f4ce7fed4dcefad79ff8b206fb5b (patch)
tree7b43c88debd03d3d4f198788d90af6fab11a70bb
parent32ab6ef9c6a05298f681200ce01f8ffa56cabb18 (diff)
downloadskyhanni-a6ce9c067db3f4ce7fed4dcefad79ff8b206fb5b.tar.gz
skyhanni-a6ce9c067db3f4ce7fed4dcefad79ff8b206fb5b.tar.bz2
skyhanni-a6ce9c067db3f4ce7fed4dcefad79ff8b206fb5b.zip
Added workaround for empty visitor description.
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt11
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?) {