Minor performance improvements

This commit is contained in:
Acrobot 2013-08-05 02:05:43 +02:00
parent 20ea8f3940
commit 9e1e582d4a
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ public class PlayerInteract implements Listener {
Action action = event.getAction();
Player player = event.getPlayer();
if (isChest(block) && Properties.USE_BUILT_IN_PROTECTION) {
if (Properties.USE_BUILT_IN_PROTECTION && isChest(block)) {
if (Properties.TURN_OFF_DEFAULT_PROTECTION_WHEN_PROTECTED_EXTERNALLY) {
return;
}

View File

@ -25,12 +25,12 @@ public class EmptyShopDeleter implements Listener {
}
Inventory ownerInventory = event.getOwnerInventory();
Sign sign = event.getSign();
if (!shopShouldBeRemoved(ownerInventory, event.getStock())) {
return;
}
Sign sign = event.getSign();
sign.getBlock().setType(Material.AIR);
if (Properties.REMOVE_EMPTY_CHESTS && !ChestShopSign.isAdminShop(ownerInventory) && InventoryUtil.isEmpty(ownerInventory)) {