From dfb13360394cc6c46678fece02ca1364b3c3cfa5 Mon Sep 17 00:00:00 2001 From: 7sat <49030779+7sat@users.noreply.github.com> Date: Thu, 20 Apr 2023 01:00:45 +0900 Subject: [PATCH] Added separate permission for 'sell' command. --- pom.xml | 2 +- src/main/java/me/sat7/dynamicshop/commands/Sell.java | 2 +- src/main/java/me/sat7/dynamicshop/constants/Constants.java | 1 + src/main/resources/plugin.yml | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 3c5b574..fdb2c4c 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.sat7 DynamicShop - 3.14.1 + 3.14.3 jar DynamicShop diff --git a/src/main/java/me/sat7/dynamicshop/commands/Sell.java b/src/main/java/me/sat7/dynamicshop/commands/Sell.java index 883d151..ab357c9 100644 --- a/src/main/java/me/sat7/dynamicshop/commands/Sell.java +++ b/src/main/java/me/sat7/dynamicshop/commands/Sell.java @@ -34,7 +34,7 @@ public boolean onCommand(CommandSender sender, Command command, String label, St Player player = (Player) sender; - if (!player.hasPermission(Constants.P_USE)) + if (!player.hasPermission(Constants.P_SELL)) { player.sendMessage(DynamicShop.dsPrefix(player) + t(player, "ERR.NO_PERMISSION")); return true; diff --git a/src/main/java/me/sat7/dynamicshop/constants/Constants.java b/src/main/java/me/sat7/dynamicshop/constants/Constants.java index 677cea1..5381ef6 100644 --- a/src/main/java/me/sat7/dynamicshop/constants/Constants.java +++ b/src/main/java/me/sat7/dynamicshop/constants/Constants.java @@ -25,6 +25,7 @@ public final class Constants public static final String P_ADMIN_ITEM_INFO = "dshop.admin.iteminfo"; public static final String P_USE = "dshop.use"; // 이 권한은 기본적으로 지급됨 + public static final String P_SELL = "dshop.sell"; // 이 권한은 기본적으로 지급됨 public static final String P_USE_QSELL = "dshop.use.qsell"; // 이 권한은 기본적으로 지급됨 private Constants() diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 8faaf82..fe013d6 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -18,6 +18,9 @@ permissions: dshop.use: description: Allows use of the /ds command default: true + dshop.sell: + description: Allows use of the /sell command + default: true dshop.use.qsell: description: Allows use of the /ds qsell command default: true \ No newline at end of file