diff --git a/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerInteract.java b/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerInteract.java index ad83272..822ea8a 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerInteract.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerInteract.java @@ -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; } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 51c54cd..a03e8dc 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -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.*: