diff --git a/src/main/java/com/Acrobot/ChestShop/Listeners/PostTransaction/EmptyShopDeleter.java b/src/main/java/com/Acrobot/ChestShop/Listeners/PostTransaction/EmptyShopDeleter.java index 4a2fe0c..e831849 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/PostTransaction/EmptyShopDeleter.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/PostTransaction/EmptyShopDeleter.java @@ -52,7 +52,19 @@ public class EmptyShopDeleter implements Listener { } private static boolean shopShouldBeRemoved(Inventory inventory, ItemStack[] stock) { - return Properties.REMOVE_EMPTY_SHOPS && !ChestShopSign.isAdminShop(inventory) && !InventoryUtil.hasItems(stock, inventory); + if (Properties.REMOVE_EMPTY_SHOPS && !ChestShopSign.isAdminShop(inventory)) { + if (Properties.ALLOW_PARTIAL_TRANSACTIONS) { + for (ItemStack itemStack : stock) { + if (inventory.containsAtLeast(itemStack, 1)) { + return false; + } + } + return true; + } else if (!InventoryUtil.hasItems(stock, inventory)) { + return true; + } + } + return false; } private static boolean isInRemoveWorld(Sign sign) {