mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
rewire getInstance for experience config
This commit is contained in:
parent
f08456b789
commit
63aebd0454
@ -2,6 +2,7 @@ package com.gmail.nossr50.config;
|
|||||||
|
|
||||||
import com.gmail.nossr50.config.collectionconfigs.CollectionClassType;
|
import com.gmail.nossr50.config.collectionconfigs.CollectionClassType;
|
||||||
import com.gmail.nossr50.config.collectionconfigs.MultiConfigContainer;
|
import com.gmail.nossr50.config.collectionconfigs.MultiConfigContainer;
|
||||||
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.config.skills.alchemy.PotionConfig;
|
import com.gmail.nossr50.config.skills.alchemy.PotionConfig;
|
||||||
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
||||||
import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
||||||
@ -44,6 +45,7 @@ public final class ConfigManager {
|
|||||||
|
|
||||||
private MainConfig mainConfig;
|
private MainConfig mainConfig;
|
||||||
private TreasureConfig treasureConfig;
|
private TreasureConfig treasureConfig;
|
||||||
|
private ExperienceConfig experienceConfig;
|
||||||
private AdvancedConfig advancedConfig;
|
private AdvancedConfig advancedConfig;
|
||||||
private PotionConfig potionConfig;
|
private PotionConfig potionConfig;
|
||||||
private CoreSkillsConfig coreSkillsConfig;
|
private CoreSkillsConfig coreSkillsConfig;
|
||||||
@ -71,6 +73,10 @@ public final class ConfigManager {
|
|||||||
advancedConfig = new AdvancedConfig();
|
advancedConfig = new AdvancedConfig();
|
||||||
unloadables.add(advancedConfig);
|
unloadables.add(advancedConfig);
|
||||||
|
|
||||||
|
//TODO: Not sure about the order of experience config
|
||||||
|
experienceConfig = new ExperienceConfig();
|
||||||
|
unloadables.add(experienceConfig);
|
||||||
|
|
||||||
potionConfig = new PotionConfig();
|
potionConfig = new PotionConfig();
|
||||||
unloadables.add(potionConfig);
|
unloadables.add(potionConfig);
|
||||||
|
|
||||||
@ -83,9 +89,6 @@ public final class ConfigManager {
|
|||||||
rankConfig = new RankConfig();
|
rankConfig = new RankConfig();
|
||||||
unloadables.add(rankConfig);
|
unloadables.add(rankConfig);
|
||||||
|
|
||||||
//TODO: This config serves no purpose so its getting removed
|
|
||||||
new ChildConfig();
|
|
||||||
|
|
||||||
/*if (MainConfig.getInstance().getToolModsEnabled()) {
|
/*if (MainConfig.getInstance().getToolModsEnabled()) {
|
||||||
new ToolConfigManager();
|
new ToolConfigManager();
|
||||||
}
|
}
|
||||||
@ -209,4 +212,8 @@ public final class ConfigManager {
|
|||||||
public RankConfig getRankConfig() {
|
public RankConfig getRankConfig() {
|
||||||
return rankConfig;
|
return rankConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ExperienceConfig getExperienceConfig() {
|
||||||
|
return experienceConfig;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.gmail.nossr50.config.experience;
|
package com.gmail.nossr50.config.experience;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.ConfigValidated;
|
import com.gmail.nossr50.config.ConfigValidated;
|
||||||
|
import com.gmail.nossr50.config.MainConfig;
|
||||||
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
||||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
@ -77,17 +78,21 @@ public class ExperienceConfig extends ConfigValidated {
|
|||||||
private static ExperienceConfig instance;
|
private static ExperienceConfig instance;
|
||||||
|
|
||||||
//TODO: Should merge be false? Seems okay to leave it as true..
|
//TODO: Should merge be false? Seems okay to leave it as true..
|
||||||
private ExperienceConfig() {
|
public ExperienceConfig() {
|
||||||
//super(McmmoCore.getDataFolderPath().getAbsoluteFile(), "experience.yml", true);
|
//super(McmmoCore.getDataFolderPath().getAbsoluteFile(), "experience.yml", true);
|
||||||
super(mcMMO.p.getDataFolder().getAbsoluteFile(), "experience.yml", true);
|
super(mcMMO.p.getDataFolder().getAbsoluteFile(), "experience.yml", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This grabs an instance of this config class from the Config Manager
|
||||||
|
* This method is deprecated and will be removed in the future
|
||||||
|
* @see mcMMO#getConfigManager()
|
||||||
|
* @return the instance of this config
|
||||||
|
* @deprecated Please use mcMMO.getConfigManager() to grab a specific config instead
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public static ExperienceConfig getInstance() {
|
public static ExperienceConfig getInstance() {
|
||||||
if (instance == null) {
|
return mcMMO.getConfigManager()
|
||||||
instance = new ExperienceConfig();
|
|
||||||
}
|
|
||||||
|
|
||||||
return instance;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.gmail.nossr50.datatypes.skills;
|
package com.gmail.nossr50.datatypes.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.MainConfig;
|
import com.gmail.nossr50.config.MainConfig;
|
||||||
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.skills.SkillManager;
|
import com.gmail.nossr50.skills.SkillManager;
|
||||||
|
Loading…
Reference in New Issue
Block a user