mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-12-24 17:17:49 +01:00
Minor performance improvements
This commit is contained in:
parent
20ea8f3940
commit
9e1e582d4a
@ -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;
|
||||
}
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user