mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-06 02:30:07 +01:00
Fix issues with shop sign opening and access permissions (Fixes #207)
This commit is contained in:
parent
6d99210dd7
commit
de5b505ec5
@ -103,19 +103,18 @@ public class PlayerInteract implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (ChestShopSign.hasPermission(player, OTHER_NAME_ACCESS, sign) && !ChestShopSign.isAdminShop(sign)) {
|
||||
if (Properties.ALLOW_SIGN_CHEST_OPEN) {
|
||||
if (Properties.ALLOW_SIGN_CHEST_OPEN && !(Properties.IGNORE_CREATIVE_MODE && player.getGameMode() == GameMode.CREATIVE)) {
|
||||
if (player.isSneaking() || player.isInsideVehicle()
|
||||
|| (Properties.IGNORE_CREATIVE_MODE && player.getGameMode() == GameMode.CREATIVE)
|
||||
|| (Properties.ALLOW_LEFT_CLICK_DESTROYING && action == LEFT_CLICK_BLOCK
|
||||
&& ChestShopSign.hasPermission(player, OTHER_NAME_DESTROY, sign))) {
|
||||
|| (Properties.ALLOW_LEFT_CLICK_DESTROYING && action == LEFT_CLICK_BLOCK && ChestShopSign.hasPermission(player, OTHER_NAME_DESTROY, sign))) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
showChestGUI(player, block, sign);
|
||||
return;
|
||||
} else if (Properties.IGNORE_ACCESS_PERMS || ChestShopSign.isOwner(player, sign)) {
|
||||
}
|
||||
if (Properties.IGNORE_ACCESS_PERMS || ChestShopSign.isOwner(player, sign)) {
|
||||
// don't allow owners or people with access to buy/sell at this shop
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user