mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-18 04:51:20 +01:00
Fix
This commit is contained in:
parent
018dcbdb7d
commit
a6113d37e1
@ -12,6 +12,7 @@ import com.willfp.ecoenchants.display.EnchantSorter.sortForDisplay
|
||||
import com.willfp.ecoenchants.enchants.EcoEnchant
|
||||
import com.willfp.ecoenchants.enchants.wrap
|
||||
import com.willfp.ecoenchants.target.EnchantmentTargets.isEnchantable
|
||||
import com.willfp.libreforge.conditions.isMet
|
||||
import org.bukkit.Material
|
||||
import org.bukkit.entity.Player
|
||||
import org.bukkit.inventory.ItemFlag
|
||||
@ -83,10 +84,12 @@ class EnchantDisplay(private val plugin: EcoEnchantsPlugin) : DisplayModule(plug
|
||||
showNotMet = true
|
||||
}
|
||||
|
||||
if (!showNotMet && !enchantLevel.conditions.isMet(player)) { // I know it's slow! I'll fix it.
|
||||
if (enchantLevel.conditions.any { it.notMetEffects.isNotEmpty() }) {
|
||||
showNotMet = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
formattedNames[DisplayableEnchant(enchant.wrap(), level)] =
|
||||
enchant.wrap().getFormattedName(level, showNotMet = showNotMet)
|
||||
|
Loading…
Reference in New Issue
Block a user