[Fix] Move allowunsafe enchant perm to: essentials.enchantments.allowunsafe

This commit is contained in:
KHobbits 2013-03-09 14:02:34 +00:00
parent 4d9685e10d
commit 46e9471a63
4 changed files with 5 additions and 5 deletions

View file

@ -36,7 +36,7 @@ public class Commandenchant extends EssentialsCommand
for (Map.Entry<String, Enchantment> entry : Enchantments.entrySet())
{
final String enchantmentName = entry.getValue().getName().toLowerCase(Locale.ENGLISH);
if (enchantmentslist.contains(enchantmentName) || (user.isAuthorized("essentials.enchant." + enchantmentName) && entry.getValue().canEnchantItem(stack)))
if (enchantmentslist.contains(enchantmentName) || (user.isAuthorized("essentials.enchantments." + enchantmentName) && entry.getValue().canEnchantItem(stack)))
{
enchantmentslist.add(entry.getKey());
//enchantmentslist.add(enchantmentName);
@ -58,7 +58,7 @@ public class Commandenchant extends EssentialsCommand
}
}
final boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments() && user.isAuthorized("essentials.enchant.allowunsafe");
final boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments() && user.isAuthorized("essentials.enchantments.allowunsafe");
final MetaItemStack metaStack = new MetaItemStack(stack);
final Enchantment enchantment = metaStack.getEnchantment(user, args[0]);

View file

@ -73,7 +73,7 @@ public class Commandgive extends EssentialsCommand
{
MetaItemStack metaStack = new MetaItemStack(stack);
boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments();
if (allowUnsafe && sender instanceof Player && !ess.getUser(sender).isAuthorized("essentials.enchant.allowunsafe"))
if (allowUnsafe && sender instanceof Player && !ess.getUser(sender).isAuthorized("essentials.enchantments.allowunsafe"))
{
allowUnsafe = false;
}

View file

@ -58,7 +58,7 @@ public class Commanditem extends EssentialsCommand
if (args.length > 2)
{
MetaItemStack metaStack = new MetaItemStack(stack);
final boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments() && user.isAuthorized("essentials.enchant.allowunsafe");
final boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments() && user.isAuthorized("essentials.enchantments.allowunsafe");
metaStack.parseStringMeta(user, allowUnsafe, args, 2, ess);

View file

@ -49,7 +49,7 @@ public class SignEnchant extends EssentialsSign
sign.setLine(2, "§c<enchant>");
throw new SignException(ex.getMessage(), ex);
}
final boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments() && player.isAuthorized("essentials.enchant.allowunsafe");
final boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments() && player.isAuthorized("essentials.enchantments.allowunsafe");
if (level < 0 || (!allowUnsafe && level > enchantment.getMaxLevel()))
{
level = enchantment.getMaxLevel();