mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Fix value written as set in yml.
Fix material group not being added at to the registry. Fix EnchantmentSquared restriction not having enchantment. Added plugin's instance as conflict source.
This commit is contained in:
parent
fc7e85529c
commit
ac7f975b02
4 changed files with 33 additions and 24 deletions
|
|
@ -110,7 +110,8 @@ class EnchantmentSquaredDependency(private val enchantmentSquaredPlugin: Plugin)
|
|||
|
||||
private fun writeMaterialRestriction(esEnchantments: List<CAEnchantSquaredEnchantment>){
|
||||
for (enchantment in esEnchantments) {
|
||||
val conflict = ConflictBuilder("restriction_${enchantment.key.key}")
|
||||
val conflict = ConflictBuilder("restriction_${enchantment.key.key}", CustomAnvil.instance)
|
||||
conflict.addEnchantment(enchantment)
|
||||
|
||||
// enchanted book is allowed in any case.
|
||||
conflict.addExcludedGroup("enchanted_book")
|
||||
|
|
@ -146,7 +147,7 @@ class EnchantmentSquaredDependency(private val enchantmentSquaredPlugin: Plugin)
|
|||
}
|
||||
|
||||
private fun writeConflict(enchantment1: CAEnchantment, enchantment2: CAEnchantment){
|
||||
val conflict = ConflictBuilder("${enchantment1.name}_with_${enchantment2.name}_conflict")
|
||||
val conflict = ConflictBuilder("${enchantment1.name}_with_${enchantment2.name}_conflict", CustomAnvil.instance)
|
||||
|
||||
conflict.addEnchantment(enchantment1).addEnchantment(enchantment2)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue