From 967291798d3f47e788ca956e2ed6c7e37d200e1d Mon Sep 17 00:00:00 2001 From: oddlama Date: Tue, 1 Aug 2023 11:26:17 +0200 Subject: [PATCH] fix(trifles): prevent in-inventory item placement into stacked storage items (fixes #206) --- .../src/main/java/org/oddlama/vane/trifles/StorageGroup.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vane-trifles/src/main/java/org/oddlama/vane/trifles/StorageGroup.java b/vane-trifles/src/main/java/org/oddlama/vane/trifles/StorageGroup.java index 4cbc00e9d..8d35f90e5 100644 --- a/vane-trifles/src/main/java/org/oddlama/vane/trifles/StorageGroup.java +++ b/vane-trifles/src/main/java/org/oddlama/vane/trifles/StorageGroup.java @@ -54,7 +54,7 @@ public void on_place_item_in_storage_inventory(InventoryClickEvent event) { // Put non-storage items in a right-clicked storage item if (event.getClick() == ClickType.RIGHT && event.getAction() == InventoryAction.SWAP_WITH_CURSOR - && is_storage_item(event.getCurrentItem())) { + && is_storage_item(event.getCurrentItem()) && event.getCurrentItem().getAmount() == 1) { // Allow putting in any items that are not a storage item, or storage items that have nothing in them. if (!(is_storage_item(event.getCursor()) && event.getCursor().hasItemMeta())) {