mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-09-28 22:47:46 +02:00
Fix restricted shops + bump version
This commit is contained in:
parent
b53751af32
commit
30c19e4864
@ -74,7 +74,7 @@ public class RestrictedSign implements Listener {
|
|||||||
|
|
||||||
Sign sign = event.getSign();
|
Sign sign = event.getSign();
|
||||||
|
|
||||||
if (isRestricted(sign) && !canAccess(sign, event.getClient())) {
|
if (isRestrictedShop(sign) && !canAccess(sign, event.getClient())) {
|
||||||
event.setCancelled(SHOP_IS_RESTRICTED);
|
event.setCancelled(SHOP_IS_RESTRICTED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -132,9 +132,13 @@ public class RestrictedSign implements Listener {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean canDestroy(Player p, Sign sign) {
|
public static boolean canDestroy(Player player, Sign sign) {
|
||||||
|
if (Permission.has(player, ADMIN)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
Sign shopSign = getAssociatedSign(sign);
|
Sign shopSign = getAssociatedSign(sign);
|
||||||
return ChestShopSign.canAccess(p, shopSign);
|
return ChestShopSign.canAccess(player, shopSign);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Sign getAssociatedSign(Sign restricted) {
|
public static Sign getAssociatedSign(Sign restricted) {
|
||||||
|
@ -2,7 +2,7 @@ name: ChestShop
|
|||||||
|
|
||||||
main: com.Acrobot.ChestShop.ChestShop
|
main: com.Acrobot.ChestShop.ChestShop
|
||||||
|
|
||||||
version: 3.50t0040
|
version: 3.50t0041
|
||||||
|
|
||||||
#for CButD
|
#for CButD
|
||||||
dev-url: http://dev.bukkit.org/server-mods/chestshop/
|
dev-url: http://dev.bukkit.org/server-mods/chestshop/
|
||||||
|
Loading…
Reference in New Issue
Block a user