From 0ed0e01f3bbe6b0d67f00a08718b0824104ae838 Mon Sep 17 00:00:00 2001 From: alexcrea <42614139+alexcrea@users.noreply.github.com> Date: Tue, 18 Jun 2024 18:08:16 +0200 Subject: [PATCH] Fix material group not working when config fix is applied. Also change Enchantment Squared warning message. --- .../EnchantmentSquaredDependency.kt | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main/kotlin/xyz/alexcrea/cuanvil/dependency/EnchantmentSquaredDependency.kt b/src/main/kotlin/xyz/alexcrea/cuanvil/dependency/EnchantmentSquaredDependency.kt index bf21134..13d27f4 100644 --- a/src/main/kotlin/xyz/alexcrea/cuanvil/dependency/EnchantmentSquaredDependency.kt +++ b/src/main/kotlin/xyz/alexcrea/cuanvil/dependency/EnchantmentSquaredDependency.kt @@ -20,10 +20,11 @@ class EnchantmentSquaredDependency(private val enchantmentSquaredPlugin: Plugin) CustomAnvil.instance.logger.info("Enchantment Squared Detected !") CustomAnvil.instance.logger.info("Please be aware that Custom Anvil is bypassing Enchantment Squared ") - CustomAnvil.instance.logger.info("\"compatible_with\", " + - "\"disable_anvil\", " + - "\"incompatible_vanilla_enchantments\", " + - "\"incompatible_custom_enchantments\", " + + CustomAnvil.instance.logger.info( + "compatible_with, " + + "disable_anvil, " + + "incompatible_vanilla_enchantments, " + + "incompatible_custom_enchantments and max_level " + "configuration values.") } @@ -103,32 +104,32 @@ class EnchantmentSquaredDependency(private val enchantmentSquaredPlugin: Plugin) val groupConfig = ConfigHolder.ITEM_GROUP_HOLDER.config if(!groupConfig.isConfigurationSection("pickaxes")){ groupConfig["pickaxes.type"] = "include" - groupConfig["pickaxes.items"] = arrayOf("wooden_pickaxe", "stone_pickaxe", "iron_pickaxe", "diamond_pickaxe", "golden_pickaxe", "netherite_pickaxe") + groupConfig["pickaxes.items"] = listOf("wooden_pickaxe", "stone_pickaxe", "iron_pickaxe", "diamond_pickaxe", "golden_pickaxe", "netherite_pickaxe") } if(!groupConfig.isConfigurationSection("shovels")){ groupConfig["shovels.type"] = "include" - groupConfig["shovels.items"] = arrayOf("wooden_shovel", "stone_shovel", "iron_shovel", "diamond_shovel", "golden_shovel", "netherite_shovel") + groupConfig["shovels.items"] = listOf("wooden_shovel", "stone_shovel", "iron_shovel", "diamond_shovel", "golden_shovel", "netherite_shovel") } if(!groupConfig.isConfigurationSection("hoes")){ groupConfig["hoes.type"] = "include" - groupConfig["hoes.items"] = arrayOf("wooden_hoe", "stone_ho", "iron_hoe", "diamond_hoe", "golden_hoe", "netherite_hoe") + groupConfig["hoes.items"] = listOf("wooden_hoe", "stone_ho", "iron_hoe", "diamond_hoe", "golden_hoe", "netherite_hoe") } if(!groupConfig.isConfigurationSection("shield")){ groupConfig["shield.type"] = "include" - groupConfig["shield.items"] = arrayOf("shield") + groupConfig["shield.items"] = listOf("shield") } if(!groupConfig.isConfigurationSection("elytra")){ groupConfig["elytra.type"] = "include" - groupConfig["elytra.items"] = arrayOf("elytra") + groupConfig["elytra.items"] = listOf("elytra") } if(!groupConfig.isConfigurationSection("trinkets")){ groupConfig["trinkets.type"] = "include" - groupConfig["trinkets.items"] = arrayOf("rotten_flesh") + groupConfig["trinkets.items"] = listOf("rotten_flesh") } }