mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-29 01:31:20 +01:00
Prevented reassigning item EnchantDisplay
This commit is contained in:
parent
a83d16762c
commit
ef4e25b7b1
@ -151,7 +151,7 @@ public class EnchantDisplay {
|
||||
hideEnchants = false;
|
||||
}
|
||||
|
||||
item = revertDisplay(item);
|
||||
revertDisplay(item);
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
if(meta == null) return item;
|
||||
@ -228,12 +228,11 @@ public class EnchantDisplay {
|
||||
}
|
||||
});
|
||||
|
||||
final ItemStack finalItem = item;
|
||||
enchantments.forEach((enchantment, level) -> {
|
||||
String name = EnchantmentCache.getEntry(enchantment).getName();
|
||||
|
||||
if(!(enchantment.getMaxLevel() == 1 && level == 1)) {
|
||||
if(useNumerals && finalItem.getEnchantmentLevel(enchantment) < numbersThreshold) {
|
||||
if(useNumerals && item.getEnchantmentLevel(enchantment) < numbersThreshold) {
|
||||
name += " " + NumberUtils.toNumeral(level);
|
||||
} else {
|
||||
name += " " + level;
|
||||
|
Loading…
Reference in New Issue
Block a user