diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantmentTarget.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantmentTarget.kt index 15c31818..30edd9a8 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantmentTarget.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantmentTarget.kt @@ -58,9 +58,14 @@ internal object AllEnchantmentTarget : EnchantmentTarget { override val id = "all" override val displayName = EcoEnchantsPlugin.instance.langYml.getFormattedString("all") override val slot = TargetSlot.ANY - override val items = EnchantmentTargets.values() - .filterNot { it == this } - .flatMap { it.items } + override var items = emptyList() + private set + + fun updateItems() { + items = EnchantmentTargets.values() + .filterNot { it == this } + .flatMap { it.items } + } override fun equals(other: Any?): Boolean { return other is AllEnchantmentTarget diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantmentTargets.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantmentTargets.kt index f4fd77ed..4d2532b7 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantmentTargets.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantmentTargets.kt @@ -74,6 +74,8 @@ object EnchantmentTargets { for (config in plugin.targetsYml.getSubsections("targets")) { ConfiguredEnchantmentTarget(config) } + + AllEnchantmentTarget.updateItems() } /** diff --git a/eco-core/core-plugin/src/main/resources/enchants/repairing.yml b/eco-core/core-plugin/src/main/resources/enchants/repairing.yml index ef59cd98..c3781e3e 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/repairing.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/repairing.yml @@ -7,7 +7,8 @@ placeholders: targets: - all -conflicts: [ ] +conflicts: + - mending rarity: veryspecial max-level: 3