From 8dbf9e4d455890ab101641aa324e94b29de43cd0 Mon Sep 17 00:00:00 2001 From: hanbings Date: Fri, 15 Dec 2023 21:08:52 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20Distinguish=20slots=20and?= =?UTF-8?q?=20raw=20slots.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit authored by LoliColleen --- .../java/com/alkaidmc/alkaid/inventory/CustomInventory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alkaid-inventory/src/main/java/com/alkaidmc/alkaid/inventory/CustomInventory.java b/alkaid-inventory/src/main/java/com/alkaidmc/alkaid/inventory/CustomInventory.java index 32caa9b..71f39cd 100644 --- a/alkaid-inventory/src/main/java/com/alkaidmc/alkaid/inventory/CustomInventory.java +++ b/alkaid-inventory/src/main/java/com/alkaidmc/alkaid/inventory/CustomInventory.java @@ -187,7 +187,7 @@ public Inventory inventory() { // item click callback int rawSlot = (event.getRawSlot()); registries.forEach(registry -> { - if (!(rawSlot == registry.slot + 36)) return; + if (!(rawSlot == registry.slot)) return; // click if (registry.action.click != null) @@ -214,7 +214,7 @@ public Inventory inventory() { // item drag callback int rawSlot = (event.getRawSlots().stream().findFirst().orElse(-1)); registries.forEach(registry -> { - if (!(rawSlot == registry.slot + 36)) return; + if (!(rawSlot == registry.slot)) return; // drag if (registry.action.drag != null)