Fix issues with shop sign opening and access permissions (Fixes #207)

This commit is contained in:
Phoenix616 2019-03-07 17:33:47 +01:00
parent 6d99210dd7
commit de5b505ec5

View File

@ -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;
}