From 19162e0619051474d60fa8aac1548087277d5b8d Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 18 Apr 2023 17:10:31 +0200 Subject: Clicking on the visitor item list opens the /bz command (only with booster cookie and only on the garden) --- .../skyhanni/features/garden/visitor/GardenVisitorFeatures.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 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 97616fe86..a5506bf5e 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 @@ -137,8 +137,14 @@ class GardenVisitorFeatures { list.add(itemStack) list.add(Renderable.optionalLink("$name ยง8x${amount.addSeparators()}", { - LorenzUtils.setTextIntoSign("$amount") - }) { Minecraft.getMinecraft().currentScreen is GuiEditSign }) + if (Minecraft.getMinecraft().currentScreen is GuiEditSign) { + LorenzUtils.setTextIntoSign("$amount") + } else { + val thePlayer = Minecraft.getMinecraft().thePlayer + val baseName = name.removeColor() + thePlayer.sendChatMessage("/bz $baseName"); + } + }) { GardenAPI.inGarden() }) if (config.visitorNeedsShowPrice) { val price = NEUItems.getPrice(internalName) * amount -- cgit