mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Config refactoring.
This commit is contained in:
@ -16,12 +16,12 @@ import com.gmail.nossr50.datatypes.treasure.ExcavationTreasure;
|
||||
import com.gmail.nossr50.datatypes.treasure.FishingTreasure;
|
||||
import com.gmail.nossr50.datatypes.treasure.Treasure;
|
||||
|
||||
public class LoadTreasures extends ConfigLoader{
|
||||
private static LoadTreasures instance;
|
||||
public class TreasuresConfig extends ConfigLoader{
|
||||
private static TreasuresConfig instance;
|
||||
|
||||
public static LoadTreasures getInstance() {
|
||||
public static TreasuresConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new LoadTreasures(mcMMO.p);
|
||||
instance = new TreasuresConfig(mcMMO.p);
|
||||
instance.load();
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ public class LoadTreasures extends ConfigLoader{
|
||||
public List<FishingTreasure> fishingRewardsTier4 = new ArrayList<FishingTreasure>();
|
||||
public List<FishingTreasure> fishingRewardsTier5 = new ArrayList<FishingTreasure>();
|
||||
|
||||
private LoadTreasures(mcMMO plugin) {
|
||||
private TreasuresConfig(mcMMO plugin) {
|
||||
super(plugin, "treasures.yml");
|
||||
config = plugin.getTreasuresConfig();
|
||||
}
|
@ -11,12 +11,12 @@ import org.bukkit.inventory.ItemStack;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.mods.CustomItem;
|
||||
|
||||
public class LoadCustomArmor extends ModConfigLoader{
|
||||
private static LoadCustomArmor instance;
|
||||
public class CustomArmorConfig extends ModConfigLoader{
|
||||
private static CustomArmorConfig instance;
|
||||
|
||||
public static LoadCustomArmor getInstance() {
|
||||
public static CustomArmorConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new LoadCustomArmor(mcMMO.p);
|
||||
instance = new CustomArmorConfig(mcMMO.p);
|
||||
}
|
||||
|
||||
return instance;
|
||||
@ -30,7 +30,7 @@ public class LoadCustomArmor extends ModConfigLoader{
|
||||
public List<Integer> customIDs = new ArrayList<Integer>();
|
||||
public List<CustomItem> customItems = new ArrayList<CustomItem>();
|
||||
|
||||
public LoadCustomArmor(mcMMO plugin) {
|
||||
public CustomArmorConfig(mcMMO plugin) {
|
||||
super(plugin, "armor.yml");
|
||||
config = plugin.getArmorConfig();
|
||||
}
|
@ -12,12 +12,12 @@ import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.mods.CustomItem;
|
||||
import com.gmail.nossr50.datatypes.mods.CustomTool;
|
||||
|
||||
public class LoadCustomTools extends ModConfigLoader {
|
||||
private static LoadCustomTools instance;
|
||||
public class CustomToolsConfig extends ModConfigLoader {
|
||||
private static CustomToolsConfig instance;
|
||||
|
||||
public static LoadCustomTools getInstance() {
|
||||
public static CustomToolsConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new LoadCustomTools(mcMMO.p);
|
||||
instance = new CustomToolsConfig(mcMMO.p);
|
||||
}
|
||||
|
||||
return instance;
|
||||
@ -33,7 +33,7 @@ public class LoadCustomTools extends ModConfigLoader {
|
||||
public List<Integer> customIDs = new ArrayList<Integer>();
|
||||
public List<CustomItem> customItems = new ArrayList<CustomItem>();
|
||||
|
||||
private LoadCustomTools(mcMMO plugin) {
|
||||
private CustomToolsConfig(mcMMO plugin) {
|
||||
super(plugin, "tools.yml");
|
||||
config = plugin.getToolsConfig();
|
||||
}
|
Reference in New Issue
Block a user