Fixed Admin Shops' sign removal

This commit is contained in:
Acrobot 2012-09-15 20:48:37 +02:00
parent 773df3bbc3
commit a9aa932a6f
2 changed files with 3 additions and 3 deletions

View File

@ -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) {

View File

@ -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/