mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-22 10:22:29 +00:00
Add permission to create an admin shop
This commit is contained in:
parent
ecf48629e5
commit
8d190f93c0
@ -288,6 +288,9 @@ messages:
|
||||
# Set the message when a not permitted player tries to create an infinite shop.
|
||||
create-infinite: "&cYou don't have permission to create an infinite shop."
|
||||
|
||||
# Set the message when a not permitted player tries to create an admin shop.
|
||||
create-admin: "&cYou don't have permission to create an admin shop."
|
||||
|
||||
# Set the message when a not permitted player tries to open another players' shop.
|
||||
open-others: "&cYou don't have permission to open this chest."
|
||||
|
||||
|
@ -30,6 +30,11 @@ permissions:
|
||||
children:
|
||||
shopchest.create: true
|
||||
default: op
|
||||
shopchest.create.admin:
|
||||
description: Allows you to create an admin shop.
|
||||
children:
|
||||
shopchest.create: true
|
||||
default: op
|
||||
shopchest.create.protected:
|
||||
description: Allows you to create a shop on a protected chest.
|
||||
children:
|
||||
|
@ -89,8 +89,13 @@ public class Commands extends BukkitCommand {
|
||||
|
||||
} else if (args[4].equalsIgnoreCase("admin")) {
|
||||
|
||||
if (perm.has(p, "shopchest.create.admin")) {
|
||||
create(args, ShopType.ADMIN, p);
|
||||
return true;
|
||||
} else {
|
||||
p.sendMessage(Config.noPermission_createAdmin());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
@ -53,6 +53,7 @@ public class Config {
|
||||
public static String shopInfo_isAdmin() { return plugin.getConfig().getString("messages.shop-info.is-admin").replaceAll("(&([a-f0-9k-or]))", "\u00A7$2");};
|
||||
public static String noPermission_create() { return plugin.getConfig().getString("messages.no-permission.create").replaceAll("(&([a-f0-9k-or]))", "\u00A7$2");}
|
||||
public static String noPermission_createInfinite() { return plugin.getConfig().getString("messages.no-permission.create-infinite").replaceAll("(&([a-f0-9k-or]))", "\u00A7$2");}
|
||||
public static String noPermission_createAdmin() { return plugin.getConfig().getString("messages.no-permission.create-admin").replaceAll("(&([a-f0-9k-or]))", "\u00A7$2");}
|
||||
public static String noPermission_openOthers() { return plugin.getConfig().getString("messages.no-permission.open-others").replaceAll("(&([a-f0-9k-or]))", "\u00A7$2");}
|
||||
public static String noPermission_removeOthers() { return plugin.getConfig().getString("messages.no-permission.remove-others").replaceAll("(&([a-f0-9k-or]))", "\u00A7$2");}
|
||||
public static String noPermission_buy() { return plugin.getConfig().getString("messages.no-permission.buy").replaceAll("(&([a-f0-9k-or]))", "\u00A7$2");}
|
||||
|
Loading…
Reference in New Issue
Block a user