diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/config/EcoEnchantsConfigs.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/config/EcoEnchantsConfigs.java index 2cffc7be..bed3f484 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/config/EcoEnchantsConfigs.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/config/EcoEnchantsConfigs.java @@ -36,7 +36,7 @@ public class EcoEnchantsConfigs { public void updateConfigs() { TARGET.update(); RARITY.update(); - enchantmentConfigs.forEach(EnchantmentYamlConfig::update); + enchantmentConfigs.forEach(EnchantmentConfig::update); } /** diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/config/EnchantmentYamlConfig.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/config/EnchantmentYamlConfig.java deleted file mode 100644 index 125156ee..00000000 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/config/EnchantmentYamlConfig.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.willfp.ecoenchants.config; - -import com.willfp.eco.util.config.ExtendableConfig; -import com.willfp.ecoenchants.EcoEnchantsPlugin; -import com.willfp.ecoenchants.enchantments.meta.EnchantmentType; -import org.jetbrains.annotations.NotNull; - -public abstract class EnchantmentYamlConfig extends ExtendableConfig { - /** - * Create new enchantment config yml. - * - * @param name The config name. - * @param source The class of the main class of source or extension. - * @param type The enchantment type. - */ - protected EnchantmentYamlConfig(@NotNull final String name, - @NotNull final Class source, - @NotNull final EnchantmentType type) { - super(name, true, EcoEnchantsPlugin.getInstance(), source, "enchants/" + type.getName() + "/"); - } -} diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/config/configs/EnchantmentConfig.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/config/configs/EnchantmentConfig.java index 05f58fe4..77cca4a9 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/config/configs/EnchantmentConfig.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/config/configs/EnchantmentConfig.java @@ -1,6 +1,7 @@ package com.willfp.ecoenchants.config.configs; -import com.willfp.ecoenchants.config.EnchantmentYamlConfig; +import com.willfp.eco.util.config.ExtendableConfig; +import com.willfp.ecoenchants.EcoEnchantsPlugin; import com.willfp.ecoenchants.enchantments.EcoEnchants; import com.willfp.ecoenchants.enchantments.meta.EnchantmentRarity; import com.willfp.ecoenchants.enchantments.meta.EnchantmentTarget; @@ -15,7 +16,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -public class EnchantmentConfig extends EnchantmentYamlConfig { +public class EnchantmentConfig extends ExtendableConfig { /** * The name of the config. */ @@ -32,7 +33,7 @@ public class EnchantmentConfig extends EnchantmentYamlConfig { public EnchantmentConfig(@NotNull final String name, @NotNull final Class plugin, @NotNull final EnchantmentType type) { - super(name, plugin, type); + super(name, true, EcoEnchantsPlugin.getInstance(), plugin, "enchants/" + type.getName() + "/"); this.name = name; }