From a6ce9c067db3f4ce7fed4dcefad79ff8b206fb5b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:23:33 +0200 Subject: Added workaround for empty visitor description. --- .../skyhanni/features/garden/visitor/GardenVisitorFeatures.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/main/java/at') 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?) { -- cgit