Removed redundant EnchantmentYamlConfig class

This commit is contained in:
Auxilor 2021-02-27 15:58:11 +00:00
parent f1ec6939d5
commit 78c6420db6
3 changed files with 5 additions and 25 deletions

View File

@ -36,7 +36,7 @@ public class EcoEnchantsConfigs {
public void updateConfigs() {
TARGET.update();
RARITY.update();
enchantmentConfigs.forEach(EnchantmentYamlConfig::update);
enchantmentConfigs.forEach(EnchantmentConfig::update);
}
/**

View File

@ -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() + "/");
}
}

View File

@ -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;
}