mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-14 22:36:12 +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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (ChestShopSign.hasPermission(player, OTHER_NAME_ACCESS, sign) && !ChestShopSign.isAdminShop(sign)) {
|
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()
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
showChestGUI(player, block, sign);
|
showChestGUI(player, block, sign);
|
||||||
return;
|
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
|
// don't allow owners or people with access to buy/sell at this shop
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user