mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-29 05:26:12 +01:00
Fix that shop info doesn't show when protected externally
This commit is contained in:
parent
ca25dca6b0
commit
c9b8e136d1
@ -66,16 +66,14 @@ public class PlayerInteract implements Listener {
|
|||||||
if (Properties.USE_BUILT_IN_PROTECTION && uBlock.couldBeShopContainer(block)) {
|
if (Properties.USE_BUILT_IN_PROTECTION && uBlock.couldBeShopContainer(block)) {
|
||||||
Sign sign = uBlock.getConnectedSign(block);
|
Sign sign = uBlock.getConnectedSign(block);
|
||||||
if (sign != null) {
|
if (sign != null) {
|
||||||
if (Properties.TURN_OFF_DEFAULT_PROTECTION_WHEN_PROTECTED_EXTERNALLY) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Security.canAccess(player, block)) {
|
if (!Security.canAccess(player, block, Properties.TURN_OFF_DEFAULT_PROTECTION_WHEN_PROTECTED_EXTERNALLY)) {
|
||||||
event.setCancelled(true);
|
|
||||||
if (Permission.has(player, Permission.SHOPINFO)) {
|
if (Permission.has(player, Permission.SHOPINFO)) {
|
||||||
ChestShop.callEvent(new ShopInfoEvent(player, sign));
|
ChestShop.callEvent(new ShopInfoEvent(player, sign));
|
||||||
} else {
|
event.setCancelled(true);
|
||||||
|
} else if (!Properties.TURN_OFF_DEFAULT_PROTECTION_WHEN_PROTECTED_EXTERNALLY) {
|
||||||
Messages.ACCESS_DENIED.send(player);
|
Messages.ACCESS_DENIED.send(player);
|
||||||
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user