aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt13
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryShortcut.kt13
3 files changed, 13 insertions, 15 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt
index 33643a172..e64e0c76b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt
@@ -101,15 +101,14 @@ class GardenVisitorSupercraft {
}
@SubscribeEvent(priority = EventPriority.HIGH)
- fun onStackClick(event: GuiContainerEvent.SlotClickEvent) {
+ fun onSlotClick(event: GuiContainerEvent.SlotClickEvent) {
if (!hasIngredients) return
- if (event.slotId == 31) {
- event.isCanceled = true
- if (lastClick.passedSince() > 0.3.seconds) {
- ChatUtils.sendCommandToServer("recipe $lastSuperCraftMaterial")
- lastClick = SimpleTimeMark.now()
- }
+ if (event.slotId != 31) return
+ event.isCanceled = true
+ if (lastClick.passedSince() > 0.3.seconds) {
+ ChatUtils.sendCommandToServer("recipe $lastSuperCraftMaterial")
+ lastClick = SimpleTimeMark.now()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt
index 883562a0b..75d0af8bb 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt
@@ -52,7 +52,7 @@ class VisitorRewardWarning {
}
@SubscribeEvent(priority = EventPriority.HIGH)
- fun onStackClick(event: GuiContainerEvent.SlotClickEvent) {
+ fun onSlotClick(event: GuiContainerEvent.SlotClickEvent) {
if (!VisitorAPI.inInventory) return
val stack = event.slot?.stack ?: return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryShortcut.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryShortcut.kt
index a1a62c727..d3bb031b2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryShortcut.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryShortcut.kt
@@ -59,13 +59,12 @@ class ChocolateFactoryShortcut {
}
@SubscribeEvent(priority = EventPriority.HIGH)
- fun onStackClick(event: GuiContainerEvent.SlotClickEvent) {
- if (showItem && event.slotId == 15) {
- event.cancel()
- if (lastClick.passedSince() > 2.seconds) {
- HypixelCommands.chocolateFactory()
- lastClick = SimpleTimeMark.now()
- }
+ fun onSlotClick(event: GuiContainerEvent.SlotClickEvent) {
+ if (!showItem || event.slotId != 15) return
+ event.cancel()
+ if (lastClick.passedSince() > 2.seconds) {
+ HypixelCommands.chocolateFactory()
+ lastClick = SimpleTimeMark.now()
}
}
}