mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-22 15:05:18 +01:00
Removed redundant EnchantmentYamlConfig class
This commit is contained in:
parent
f1ec6939d5
commit
78c6420db6
@ -36,7 +36,7 @@ public class EcoEnchantsConfigs {
|
||||
public void updateConfigs() {
|
||||
TARGET.update();
|
||||
RARITY.update();
|
||||
enchantmentConfigs.forEach(EnchantmentYamlConfig::update);
|
||||
enchantmentConfigs.forEach(EnchantmentConfig::update);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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() + "/");
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user