Add separate permission for bulk sell and hand sell.

This commit is contained in:
drtshock 2015-08-07 16:53:20 -05:00
parent b066d4dd83
commit fe1dd0d0f3
2 changed files with 9 additions and 0 deletions

View File

@ -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;

View File

@ -386,6 +386,8 @@ second=second
seconds=seconds
seenOffline=\u00a76Player\u00a7c {0} \u00a76has been \u00a74offline\u00a76 since \u00a7c{1}\u00a76.
seenOnline=\u00a76Player\u00a7c {0} \u00a76has been \u00a7aonline\u00a76 since \u00a7c{1}\u00a76.
sellBulkPermission=\u00a76You do not have permission to bulk sell.
sellHandPermission=\u00a76You do not have permission to bulk sell.
serverFull=Server is full\!
serverTotal=\u00a76Server Total\:\u00a7c {0}
setBal=\u00a7aYour balance was set to {0}.