mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Because making it upper case broke all the things.
This commit is contained in:
@ -5,7 +5,7 @@ import java.util.Set;
|
||||
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
|
||||
public class Config extends ConfigLoader {
|
||||
public int xpGainMultiplier = 1;
|
||||
@ -13,7 +13,7 @@ public class Config extends ConfigLoader {
|
||||
|
||||
public static Config getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new Config(McMMO.p);
|
||||
instance = new Config(mcMMO.p);
|
||||
instance.load();
|
||||
}
|
||||
|
||||
@ -375,7 +375,7 @@ public class Config extends ConfigLoader {
|
||||
* CONFIG LOADING
|
||||
*/
|
||||
|
||||
private Config(McMMO plugin) {
|
||||
private Config(mcMMO plugin) {
|
||||
super(plugin, "config.yml");
|
||||
saveIfNotExist();
|
||||
xpGainMultiplier = getExperienceGainsGlobalMultiplier();
|
||||
|
@ -6,16 +6,16 @@ import java.io.IOException;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
|
||||
public abstract class ConfigLoader {
|
||||
protected String fileName;
|
||||
protected File configFile;
|
||||
protected File dataFolder;
|
||||
protected final McMMO plugin;
|
||||
protected final mcMMO plugin;
|
||||
protected FileConfiguration config;
|
||||
|
||||
public ConfigLoader(McMMO plugin, String fileName){
|
||||
public ConfigLoader(mcMMO plugin, String fileName){
|
||||
this.plugin = plugin;
|
||||
this.fileName = fileName;
|
||||
dataFolder = plugin.getDataFolder();
|
||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.config;
|
||||
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
|
||||
public class HiddenConfig extends ConfigLoader {
|
||||
private static String fileName;
|
||||
@ -11,7 +11,7 @@ public class HiddenConfig extends ConfigLoader {
|
||||
|
||||
private static boolean chunkletsEnabled;
|
||||
|
||||
public HiddenConfig(McMMO plugin, String fileName) {
|
||||
public HiddenConfig(mcMMO plugin, String fileName) {
|
||||
super(plugin, fileName);
|
||||
HiddenConfig.fileName = fileName;
|
||||
}
|
||||
@ -19,7 +19,7 @@ public class HiddenConfig extends ConfigLoader {
|
||||
|
||||
public static HiddenConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new HiddenConfig(McMMO.p, "hidden.yml");
|
||||
instance = new HiddenConfig(mcMMO.p, "hidden.yml");
|
||||
instance.load();
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ import java.util.Set;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.skills.repair.RepairItemType;
|
||||
import com.gmail.nossr50.skills.repair.RepairMaterialType;
|
||||
import com.gmail.nossr50.skills.repair.Repairable;
|
||||
@ -16,7 +16,7 @@ import com.gmail.nossr50.skills.repair.RepairableFactory;
|
||||
public class RepairConfig extends ConfigLoader {
|
||||
private List<Repairable> repairables;
|
||||
|
||||
public RepairConfig(McMMO plugin, String fileName) {
|
||||
public RepairConfig(mcMMO plugin, String fileName) {
|
||||
super(plugin, fileName);
|
||||
this.config = YamlConfiguration.loadConfiguration(this.configFile);
|
||||
}
|
||||
|
@ -5,13 +5,13 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.skills.repair.Repairable;
|
||||
|
||||
public class RepairConfigManager {
|
||||
private List<Repairable> repairables;
|
||||
|
||||
public RepairConfigManager(McMMO plugin) {
|
||||
public RepairConfigManager(mcMMO plugin) {
|
||||
repairables = new ArrayList<Repairable>();
|
||||
|
||||
Pattern pattern = Pattern.compile("repair\\.(?:.+)\\.yml");
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.gmail.nossr50.config;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.HUDType;
|
||||
|
||||
public class SpoutConfig extends ConfigLoader {
|
||||
@ -8,7 +8,7 @@ public class SpoutConfig extends ConfigLoader {
|
||||
|
||||
public static SpoutConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new SpoutConfig(McMMO.p);
|
||||
instance = new SpoutConfig(mcMMO.p);
|
||||
instance.load();
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ public class SpoutConfig extends ConfigLoader {
|
||||
|
||||
public HUDType defaulthud;
|
||||
|
||||
private SpoutConfig(McMMO plugin) {
|
||||
private SpoutConfig(mcMMO plugin) {
|
||||
super(plugin, "spout.yml");
|
||||
saveIfNotExist();
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.treasure.ExcavationTreasure;
|
||||
import com.gmail.nossr50.datatypes.treasure.FishingTreasure;
|
||||
import com.gmail.nossr50.datatypes.treasure.Treasure;
|
||||
@ -21,7 +21,7 @@ public class TreasuresConfig extends ConfigLoader{
|
||||
|
||||
public static TreasuresConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new TreasuresConfig(McMMO.p);
|
||||
instance = new TreasuresConfig(mcMMO.p);
|
||||
instance.load();
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ public class TreasuresConfig extends ConfigLoader{
|
||||
public List<FishingTreasure> fishingRewardsTier4 = new ArrayList<FishingTreasure>();
|
||||
public List<FishingTreasure> fishingRewardsTier5 = new ArrayList<FishingTreasure>();
|
||||
|
||||
private TreasuresConfig(McMMO plugin) {
|
||||
private TreasuresConfig(mcMMO plugin) {
|
||||
super(plugin, "treasures.yml");
|
||||
saveIfNotExist();
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import java.util.Set;
|
||||
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.mods.CustomItem;
|
||||
import com.gmail.nossr50.skills.repair.Repairable;
|
||||
import com.gmail.nossr50.skills.repair.RepairableFactory;
|
||||
@ -18,7 +18,7 @@ public class CustomArmorConfig extends ModConfigLoader{
|
||||
|
||||
public static CustomArmorConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new CustomArmorConfig(McMMO.p);
|
||||
instance = new CustomArmorConfig(mcMMO.p);
|
||||
}
|
||||
|
||||
return instance;
|
||||
@ -35,7 +35,7 @@ public class CustomArmorConfig extends ModConfigLoader{
|
||||
public List<CustomItem> customArmorList = new ArrayList<CustomItem>();
|
||||
public HashMap<Integer, CustomItem> customArmor = new HashMap<Integer, CustomItem>();
|
||||
|
||||
public CustomArmorConfig(McMMO plugin) {
|
||||
public CustomArmorConfig(mcMMO plugin) {
|
||||
super(plugin, "armor.yml");
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ import java.util.Set;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
||||
|
||||
public class CustomBlocksConfig extends ModConfigLoader{
|
||||
@ -16,7 +16,7 @@ public class CustomBlocksConfig extends ModConfigLoader{
|
||||
|
||||
public static CustomBlocksConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new CustomBlocksConfig(McMMO.p);
|
||||
instance = new CustomBlocksConfig(mcMMO.p);
|
||||
}
|
||||
|
||||
return instance;
|
||||
@ -34,7 +34,7 @@ public class CustomBlocksConfig extends ModConfigLoader{
|
||||
public List<ItemStack> customItems = new ArrayList<ItemStack>();
|
||||
public List<CustomBlock> customBlocks = new ArrayList<CustomBlock>();
|
||||
|
||||
public CustomBlocksConfig(McMMO plugin) {
|
||||
public CustomBlocksConfig(mcMMO plugin) {
|
||||
super(plugin, "blocks.yml");
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ import java.util.Set;
|
||||
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.mods.CustomTool;
|
||||
import com.gmail.nossr50.skills.repair.Repairable;
|
||||
import com.gmail.nossr50.skills.repair.RepairableFactory;
|
||||
@ -18,7 +18,7 @@ public class CustomToolsConfig extends ModConfigLoader {
|
||||
|
||||
public static CustomToolsConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new CustomToolsConfig(McMMO.p);
|
||||
instance = new CustomToolsConfig(mcMMO.p);
|
||||
}
|
||||
|
||||
return instance;
|
||||
@ -37,7 +37,7 @@ public class CustomToolsConfig extends ModConfigLoader {
|
||||
public List<CustomTool> customToolList = new ArrayList<CustomTool>();
|
||||
public HashMap<Integer, CustomTool> customTools = new HashMap<Integer, CustomTool>();
|
||||
|
||||
private CustomToolsConfig(McMMO plugin) {
|
||||
private CustomToolsConfig(mcMMO plugin) {
|
||||
super(plugin, "tools.yml");
|
||||
}
|
||||
|
||||
|
@ -2,12 +2,12 @@ package com.gmail.nossr50.config.mods;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.ConfigLoader;
|
||||
|
||||
public abstract class ModConfigLoader extends ConfigLoader{
|
||||
|
||||
public ModConfigLoader(McMMO plugin, String fileName) {
|
||||
public ModConfigLoader(mcMMO plugin, String fileName) {
|
||||
super(plugin, "ModConfigs" + File.separator + fileName);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user