mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-15 02:59:06 +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]));
|
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++)
|
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]));
|
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++)
|
for (int i = 2; i < args.length; i++)
|
||||||
{
|
{
|
||||||
|
@@ -38,6 +38,7 @@ public enum Permissions implements IPermission
|
|||||||
GEOIP_SHOW(PermissionDefault.TRUE),
|
GEOIP_SHOW(PermissionDefault.TRUE),
|
||||||
GETPOS_OTHERS,
|
GETPOS_OTHERS,
|
||||||
GOD_OTHERS,
|
GOD_OTHERS,
|
||||||
|
GIVE_ENCHANTED,
|
||||||
HEAL_COOLDOWN_BYPASS,
|
HEAL_COOLDOWN_BYPASS,
|
||||||
HEAL_OTHERS,
|
HEAL_OTHERS,
|
||||||
HELPOP_RECEIVE,
|
HELPOP_RECEIVE,
|
||||||
@@ -46,6 +47,7 @@ public enum Permissions implements IPermission
|
|||||||
JOINFULLSERVER,
|
JOINFULLSERVER,
|
||||||
INVSEE_MODIFY,
|
INVSEE_MODIFY,
|
||||||
INVSEE_PREVENT_MODIFY,
|
INVSEE_PREVENT_MODIFY,
|
||||||
|
ITEM_ENCHANTED,
|
||||||
KEEPXP,
|
KEEPXP,
|
||||||
KICK_EXEMPT,
|
KICK_EXEMPT,
|
||||||
KICK_NOTIFY,
|
KICK_NOTIFY,
|
||||||
|
Reference in New Issue
Block a user