diff options
author | Chris Ward <chris@chrisgward.com> | 2013-01-09 20:22:37 +1100 |
---|---|---|
committer | Chris Ward <chris@chrisgward.com> | 2013-01-09 20:22:37 +1100 |
commit | 688cfca62595430ba28242394b9fa49e3f7360a0 (patch) | |
tree | 6b12768b80e18b328bd81ad880d0229afc5383cf | |
parent | 9a0b3d0db1d16bdd77fce824a90a8faf807f719d (diff) | |
download | Essentials-688cfca62595430ba28242394b9fa49e3f7360a0.tar Essentials-688cfca62595430ba28242394b9fa49e3f7360a0.tar.gz Essentials-688cfca62595430ba28242394b9fa49e3f7360a0.tar.lz Essentials-688cfca62595430ba28242394b9fa49e3f7360a0.tar.xz Essentials-688cfca62595430ba28242394b9fa49e3f7360a0.zip |
Make /enchant only show valid enchantments for the item.
d551e8c6d235d73b536ddaab92431ac42e735ab2
-rw-r--r-- | Essentials/src/net/ess3/commands/Commandenchant.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Essentials/src/net/ess3/commands/Commandenchant.java b/Essentials/src/net/ess3/commands/Commandenchant.java index dbb58f0a5..dab1a5efb 100644 --- a/Essentials/src/net/ess3/commands/Commandenchant.java +++ b/Essentials/src/net/ess3/commands/Commandenchant.java @@ -31,7 +31,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) || Permissions.ENCHANT.isAuthorized(user, enchantmentName)) + if (enchantmentslist.contains(enchantmentName) || (Permissions.ENCHANT.isAuthorized(user, enchantmentName) && entry.getValue().canEnchantItem(stack))) { enchantmentslist.add(entry.getKey()); //enchantmentslist.add(enchantmentName); |