mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-24 00:26:16 +02:00
Make compatibility object with EcoEnchant and Enchant² use the api.
Abstract material group now have varargs "addAll" function.
This commit is contained in:
parent
1bd3328281
commit
bcd8b6ae6e
7 changed files with 100 additions and 79 deletions
|
|
@ -1,10 +1,12 @@
|
|||
package xyz.alexcrea.cuanvil.dependency
|
||||
|
||||
import org.bukkit.Bukkit
|
||||
import org.bukkit.configuration.file.FileConfiguration
|
||||
import org.bukkit.plugin.Plugin
|
||||
import xyz.alexcrea.cuanvil.dependency.protocolib.NoProtocoLib
|
||||
import xyz.alexcrea.cuanvil.dependency.protocolib.PacketManager
|
||||
import xyz.alexcrea.cuanvil.dependency.protocolib.ProtocoLibWrapper
|
||||
import xyz.alexcrea.cuanvil.enchant.CAEnchantment
|
||||
import java.io.File
|
||||
|
||||
object DependencyManager {
|
||||
|
|
@ -43,4 +45,12 @@ object DependencyManager {
|
|||
|
||||
}
|
||||
|
||||
fun writeDefaultConfig(defaultConfig: FileConfiguration, enchantment: CAEnchantment) {
|
||||
defaultConfig["enchant_limits.${enchantment.key.key}"] = enchantment.defaultMaxLevel()
|
||||
|
||||
val rarity = enchantment.defaultRarity()
|
||||
defaultConfig["enchant_values.${enchantment.key.key}.item"] = rarity.itemValue
|
||||
defaultConfig["enchant_values.${enchantment.key.key}.book"] = rarity.bookValue
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue