mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-01-08 08:08:05 +01:00
Fix more issues with the shop access permissions (#207)
This commit is contained in:
parent
de5b505ec5
commit
b931393a62
@ -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;
|
||||
}
|
||||
|
@ -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.*:
|
||||
|
Loading…
Reference in New Issue
Block a user