mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-25 15:35:11 +01:00
Fixes
This commit is contained in:
parent
6f4ad07511
commit
8bb14aa86a
@ -58,9 +58,14 @@ internal object AllEnchantmentTarget : EnchantmentTarget {
|
|||||||
override val id = "all"
|
override val id = "all"
|
||||||
override val displayName = EcoEnchantsPlugin.instance.langYml.getFormattedString("all")
|
override val displayName = EcoEnchantsPlugin.instance.langYml.getFormattedString("all")
|
||||||
override val slot = TargetSlot.ANY
|
override val slot = TargetSlot.ANY
|
||||||
override val items = EnchantmentTargets.values()
|
override var items = emptyList<TestableItem>()
|
||||||
|
private set
|
||||||
|
|
||||||
|
fun updateItems() {
|
||||||
|
items = EnchantmentTargets.values()
|
||||||
.filterNot { it == this }
|
.filterNot { it == this }
|
||||||
.flatMap { it.items }
|
.flatMap { it.items }
|
||||||
|
}
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
return other is AllEnchantmentTarget
|
return other is AllEnchantmentTarget
|
||||||
|
@ -74,6 +74,8 @@ object EnchantmentTargets {
|
|||||||
for (config in plugin.targetsYml.getSubsections("targets")) {
|
for (config in plugin.targetsYml.getSubsections("targets")) {
|
||||||
ConfiguredEnchantmentTarget(config)
|
ConfiguredEnchantmentTarget(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AllEnchantmentTarget.updateItems()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,7 +7,8 @@ placeholders:
|
|||||||
|
|
||||||
targets:
|
targets:
|
||||||
- all
|
- all
|
||||||
conflicts: [ ]
|
conflicts:
|
||||||
|
- mending
|
||||||
rarity: veryspecial
|
rarity: veryspecial
|
||||||
max-level: 3
|
max-level: 3
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user