mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-26 16:39:45 +00:00
Make /enchant only show valid enchantments for the item.
This commit is contained in:
parent
69ad186839
commit
d551e8c6d2
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,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))
|
||||
if (enchantmentslist.contains(enchantmentName) || (user.isAuthorized("essentials.enchant." + enchantmentName) && entry.getValue().canEnchantItem(stack)))
|
||||
{
|
||||
enchantmentslist.add(entry.getKey());
|
||||
//enchantmentslist.add(enchantmentName);
|
||||
|
|
Loading…
Reference in a new issue