mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-22 21:43:41 +00:00
Add separate permission for bulk sell and hand sell.
This commit is contained in:
parent
b066d4dd83
commit
fe1dd0d0f3
2 changed files with 9 additions and 0 deletions
|
@ -26,6 +26,13 @@ public class Commandsell extends EssentialsCommand {
|
|||
if (args.length < 1) {
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
|
||||
if (args[0].equalsIgnoreCase("hand") && !user.isAuthorized("essentials.sell.hand")) {
|
||||
throw new Exception(tl("sellHandPermission"));
|
||||
} else if (args[0].equalsIgnoreCase("inventory") || args[0].equalsIgnoreCase("invent") || args[0].equalsIgnoreCase("all") && !user.isAuthorized("essentials.sell.bulk")) {
|
||||
throw new Exception(tl("sellBulkPermission"));
|
||||
}
|
||||
|
||||
List<ItemStack> is = ess.getItemDb().getMatching(user, args);
|
||||
int count = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue