mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-12-25 17:37:34 +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();
|
Action action = event.getAction();
|
||||||
Player player = event.getPlayer();
|
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) {
|
if (Properties.TURN_OFF_DEFAULT_PROTECTION_WHEN_PROTECTED_EXTERNALLY) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -25,12 +25,12 @@ public class EmptyShopDeleter implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Inventory ownerInventory = event.getOwnerInventory();
|
Inventory ownerInventory = event.getOwnerInventory();
|
||||||
Sign sign = event.getSign();
|
|
||||||
|
|
||||||
if (!shopShouldBeRemoved(ownerInventory, event.getStock())) {
|
if (!shopShouldBeRemoved(ownerInventory, event.getStock())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Sign sign = event.getSign();
|
||||||
sign.getBlock().setType(Material.AIR);
|
sign.getBlock().setType(Material.AIR);
|
||||||
|
|
||||||
if (Properties.REMOVE_EMPTY_CHESTS && !ChestShopSign.isAdminShop(ownerInventory) && InventoryUtil.isEmpty(ownerInventory)) {
|
if (Properties.REMOVE_EMPTY_CHESTS && !ChestShopSign.isAdminShop(ownerInventory) && InventoryUtil.isEmpty(ownerInventory)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user