Skip to content

Commit

Permalink
Added separate permission for 'sell' command.
Browse files Browse the repository at this point in the history
  • Loading branch information
7sat committed Apr 19, 2023
1 parent c49cde4 commit dfb1336
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.sat7</groupId>
<artifactId>DynamicShop</artifactId>
<version>3.14.1</version>
<version>3.14.3</version>
<packaging>jar</packaging>

<name>DynamicShop</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/sat7/dynamicshop/commands/Sell.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/me/sat7/dynamicshop/constants/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit dfb1336

Please sign in to comment.