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:
@@ -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++)
|
||||
{
|
||||
|
@@ -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++)
|
||||
{
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user