Fix more issues with the shop access permissions (#207)

This commit is contained in:
Phoenix616 2019-03-08 22:52:08 +01:00
parent de5b505ec5
commit b931393a62
2 changed files with 12 additions and 12 deletions

View File

@ -105,16 +105,16 @@ public class PlayerInteract implements Listener {
if (ChestShopSign.hasPermission(player, OTHER_NAME_ACCESS, sign) && !ChestShopSign.isAdminShop(sign)) {
if (Properties.ALLOW_SIGN_CHEST_OPEN && !(Properties.IGNORE_CREATIVE_MODE && player.getGameMode() == GameMode.CREATIVE)) {
if (player.isSneaking() || player.isInsideVehicle()
|| (Properties.ALLOW_LEFT_CLICK_DESTROYING && action == LEFT_CLICK_BLOCK && ChestShopSign.hasPermission(player, OTHER_NAME_DESTROY, sign))) {
if (Properties.IGNORE_ACCESS_PERMS || ChestShopSign.isOwner(player, sign)) {
if (Properties.ALLOW_SIGN_CHEST_OPEN && !(Properties.IGNORE_CREATIVE_MODE && player.getGameMode() == GameMode.CREATIVE)) {
if (player.isSneaking() || player.isInsideVehicle()
|| (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;
}
event.setCancelled(true);
showChestGUI(player, block, sign);
return;
}
if (Properties.IGNORE_ACCESS_PERMS || ChestShopSign.isOwner(player, sign)) {
// don't allow owners or people with access to buy/sell at this shop
return;
}

View File

@ -82,13 +82,13 @@ permissions:
ChestShop.mod:
description: Allows user only to view other store chests, he can't destroy them or create an Admin Shop
children:
ChestShop.name.access.*: true
ChestShop.othername.access.*: true
ChestShop.name.*:
description: Gives you the power to do create and access shops for all names.
children:
ChestShop.name.create.*: true
ChestShop.name.destroy.*: true
ChestShop.name.access.*: true
ChestShop.othername.create.*: true
ChestShop.othername.destroy.*: true
ChestShop.othername.access.*: true
ChestShop.name.(some name):
description: Gives you the power to do create and access shops for (some name), for example your town.
ChestShop.name.create.*: