diff --git a/com/Acrobot/ChestShop/Listeners/PostTransaction/EmptyShopDeleter.java b/com/Acrobot/ChestShop/Listeners/PostTransaction/EmptyShopDeleter.java index 6f4652b..f8af3ad 100644 --- a/com/Acrobot/ChestShop/Listeners/PostTransaction/EmptyShopDeleter.java +++ b/com/Acrobot/ChestShop/Listeners/PostTransaction/EmptyShopDeleter.java @@ -36,7 +36,7 @@ public class EmptyShopDeleter implements Listener { sign.getBlock().setType(Material.AIR); - if (Config.getBoolean(REMOVE_EMPTY_CHESTS) && !ChestShopSign.isAdminShop(sign) && chestIsEmpty(event.getOwnerInventory())) { + if (Config.getBoolean(REMOVE_EMPTY_CHESTS) && !ChestShopSign.isAdminShop(ownerInventory) && chestIsEmpty(ownerInventory)) { Chest connectedChest = uBlock.findConnectedChest(sign); connectedChest.getBlock().setType(Material.AIR); } else { @@ -55,7 +55,7 @@ public class EmptyShopDeleter implements Listener { } private static boolean shopShouldBeRemoved(Inventory inventory, ItemStack[] stock) { - return Config.getBoolean(REMOVE_EMPTY_SHOPS) && !hasMoreStock(inventory, stock); + return Config.getBoolean(REMOVE_EMPTY_SHOPS) && !ChestShopSign.isAdminShop(inventory) && !hasMoreStock(inventory, stock); } private static boolean hasMoreStock(Inventory inventory, ItemStack[] stock) { diff --git a/plugin.yml b/plugin.yml index 912a323..42a34f6 100644 --- a/plugin.yml +++ b/plugin.yml @@ -2,7 +2,7 @@ name: ChestShop main: com.Acrobot.ChestShop.ChestShop -version: 3.50t0010 +version: 3.50t0011 #for CButD dev-url: http://dev.bukkit.org/server-mods/chestshop/