1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-13 18:14:38 +02:00

New permissions: essentials.give.enchanted essentials.item.enchanted

This commit is contained in:
snowleo
2012-10-14 23:01:34 +02:00
parent cb528935de
commit 93fe12f433
3 changed files with 4 additions and 2 deletions

View File

@@ -41,7 +41,7 @@ public class Commandgive extends EssentialsCommand
stack.setAmount(Integer.parseInt(args[2]));
}
if (args.length > 3)
if (args.length > 3 && Permissions.GIVE_ENCHANTED.isAuthorized(sender))
{
for (int i = Util.isInt(args[3]) ? 4 : 3; i < args.length; i++)
{

View File

@@ -37,7 +37,7 @@ public class Commanditem extends EssentialsCommand
stack.setAmount(Integer.parseInt(args[1]));
}
if (args.length > 2)
if (args.length > 2 && Permissions.ITEM_ENCHANTED.isAuthorized(user))
{
for (int i = 2; i < args.length; i++)
{

View File

@@ -38,6 +38,7 @@ public enum Permissions implements IPermission
GEOIP_SHOW(PermissionDefault.TRUE),
GETPOS_OTHERS,
GOD_OTHERS,
GIVE_ENCHANTED,
HEAL_COOLDOWN_BYPASS,
HEAL_OTHERS,
HELPOP_RECEIVE,
@@ -46,6 +47,7 @@ public enum Permissions implements IPermission
JOINFULLSERVER,
INVSEE_MODIFY,
INVSEE_PREVENT_MODIFY,
ITEM_ENCHANTED,
KEEPXP,
KICK_EXEMPT,
KICK_NOTIFY,