Added hide-in-lore flag

This commit is contained in:
Auxilor 2021-12-29 18:33:49 +00:00
parent 3a24a27da7
commit 2ed76f1051

View File

@ -124,6 +124,10 @@ public class EnchantDisplay extends DisplayModule {
enchantments.clear();
unsorted.forEach(enchantment -> enchantments.put(enchantment, tempEnchantments.get(enchantment)));
enchantments.forEach((enchantment, level) -> {
if (enchantment instanceof EcoEnchant ecoEnchant && ecoEnchant.hasFlag("hide-in-lore")) {
return;
}
String name = player == null
? EnchantmentCache.getEntry(enchantment).getNameWithLevel(level)
: EnchantmentCache.getEntry(enchantment).getNameWithLevel(level, player);