fix missing return statement

This commit is contained in:
alexcrea 2025-04-27 19:32:36 +02:00
parent 92960ca819
commit 007f6be7f1
No known key found for this signature in database
GPG key ID: 027DD67D2D3280C5

View file

@ -222,6 +222,7 @@ object DataPackDependency {
} }
conflict.addEnchantment(NamespacedKey.fromString(ench)!!) conflict.addEnchantment(NamespacedKey.fromString(ench)!!)
return false
} }
// Find current conflict // Find current conflict
val manager = ConfigHolder.CONFLICT_HOLDER.conflictManager val manager = ConfigHolder.CONFLICT_HOLDER.conflictManager
@ -229,11 +230,12 @@ object DataPackDependency {
// This assumes that: // This assumes that:
// - the conflict existing in the config exist in the runtime config // - the conflict existing in the config exist in the runtime config
// - the enchantment exist and is provided correctly // - the enchantment exist and is provided correctly
val conflict = manager.conflictList.find { it.name == group }!! val conflict = manager.conflictList.find {
conflict.addEnchantment(EnchantmentApi.getByKey(NamespacedKey.fromString(ench)!!)!!) it.name.equals(group, ignoreCase = true)
}
conflict!!.addEnchantment(EnchantmentApi.getByKey(NamespacedKey.fromString(ench)!!)!!)
UpdateUtils.addAbsentToList(config, "$group.enchantments", ench) UpdateUtils.addAbsentToList(config, "$group.enchantments", ench)
return true return true
} }
} }