mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-12 11:21:28 +01:00
Make /enchant only show valid enchantments for the item.
This commit is contained in:
parent
69ad186839
commit
d551e8c6d2
@ -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 New Issue
Block a user