mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-12-28 02:47:34 +01:00
Fixed Admin Shops' sign removal
This commit is contained in:
parent
773df3bbc3
commit
a9aa932a6f
@ -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) {
|
||||
|
@ -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/
|
||||
|
Loading…
Reference in New Issue
Block a user