Skip to content

Commit

Permalink
fix(trifles): prevent in-inventory item placement into stacked storag…
Browse files Browse the repository at this point in the history
…e items (fixes #206)
  • Loading branch information
oddlama committed Aug 1, 2023
1 parent 3c9a14c commit 9672917
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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())) {
Expand Down

0 comments on commit 9672917

Please sign in to comment.