// Path: src/main/java/myessentials/MyEssentialsCore.java
// @Mod(modid = "MyEssentials-Core", name = "MyEssentials-Core", version = "@VERSION@", dependencies = "required-after:Forge", acceptableRemoteVersions = "*")
// public class MyEssentialsCore {
//     @Instance("MyEssentials-Core")
//     public static MyEssentialsCore instance;
// 
//     public Local LOCAL;
//     public Logger LOG;
// 
//     @EventHandler
//     public void preInit(FMLPreInitializationEvent ev) {
// 
//         LOG = ev.getModLog();
//         Constants.CONFIG_FOLDER = ev.getModConfigurationDirectory().getPath() + "/MyEssentials-Core/";
//         Constants.DATABASE_FOLDER = ev.getModConfigurationDirectory().getParent() + "/databases/";
//         // Load Configs
//         Config.instance.init(Constants.CONFIG_FOLDER + "/Core.cfg", "MyEssentials-Core");
//         // REF: The localization can simply take the whole config instance to get the localization needed.
//         LOCAL = new Local(Constants.CONFIG_FOLDER + "/localization/", Config.instance.localization.get(), "/myessentials/localization/", MyEssentialsCore.class);
//         LocalManager.register(LOCAL, "myessentials");
// 
//         // Register handlers/trackers
//         FMLCommonHandler.instance().bus().register(PlayerTracker.instance);
//         MinecraftForge.EVENT_BUS.register(PlayerTracker.instance);
// 
//         FMLCommonHandler.instance().bus().register(ToolManager.instance);
//         MinecraftForge.EVENT_BUS.register(ToolManager.instance);
// 
//         FMLCommonHandler.instance().bus().register(SignManager.instance);
//         MinecraftForge.EVENT_BUS.register(SignManager.instance);
//     }
// }


import myessentials.MyEssentialsCore;
import net.minecraftforge.common.config.ConfigCategory;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
import org.apache.commons.lang3.exception.ExceptionUtils;
import java.io.File;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
        }
    }

    /**
     * Loads the config file from the hard drive
     */
    public void reload() {
        config.load();
        for (ConfigProperty property : properties) {
            ConfigCategory category = config.getCategory(property.category);
            Property forgeProp;
            if (!category.containsKey(property.name)) {
                forgeProp = new Property(property.name, property.get().toString(), property.getType());
                forgeProp.comment = property.comment;
                category.put(property.name, forgeProp);
            } else {
                forgeProp = category.get(property.name);
                forgeProp.comment = property.comment;
            }
            setProperty(property, forgeProp);
        }
        config.save();
    }

    private void bind() {
        for (Field field : getClass().getDeclaredFields()) {
            if (field.getType().isAssignableFrom(ConfigProperty.class)) {
                try {
                    properties.add((ConfigProperty)field.get(this));
                } catch (IllegalAccessException ex) {
// Path: src/main/java/myessentials/MyEssentialsCore.java
// @Mod(modid = "MyEssentials-Core", name = "MyEssentials-Core", version = "@VERSION@", dependencies = "required-after:Forge", acceptableRemoteVersions = "*")
// public class MyEssentialsCore {
//     @Instance("MyEssentials-Core")
//     public static MyEssentialsCore instance;
// 
//     public Local LOCAL;
//     public Logger LOG;
// 
//     @EventHandler
//     public void preInit(FMLPreInitializationEvent ev) {
// 
//         LOG = ev.getModLog();
//         Constants.CONFIG_FOLDER = ev.getModConfigurationDirectory().getPath() + "/MyEssentials-Core/";
//         Constants.DATABASE_FOLDER = ev.getModConfigurationDirectory().getParent() + "/databases/";
//         // Load Configs
//         Config.instance.init(Constants.CONFIG_FOLDER + "/Core.cfg", "MyEssentials-Core");
//         // REF: The localization can simply take the whole config instance to get the localization needed.
//         LOCAL = new Local(Constants.CONFIG_FOLDER + "/localization/", Config.instance.localization.get(), "/myessentials/localization/", MyEssentialsCore.class);
//         LocalManager.register(LOCAL, "myessentials");
// 
//         // Register handlers/trackers
//         FMLCommonHandler.instance().bus().register(PlayerTracker.instance);
//         MinecraftForge.EVENT_BUS.register(PlayerTracker.instance);
// 
//         FMLCommonHandler.instance().bus().register(ToolManager.instance);
//         MinecraftForge.EVENT_BUS.register(ToolManager.instance);
// 
//         FMLCommonHandler.instance().bus().register(SignManager.instance);
//         MinecraftForge.EVENT_BUS.register(SignManager.instance);
//     }
// }


// Path: src/main/java/myessentials/config/api/ConfigTemplate.java
import myessentials.MyEssentialsCore;
import net.minecraftforge.common.config.ConfigCategory;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
import org.apache.commons.lang3.exception.ExceptionUtils;
import java.io.File;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

        }
    }

    /**
     * Loads the config file from the hard drive
     */
    public void reload() {
        config.load();
        for (ConfigProperty property : properties) {
            ConfigCategory category = config.getCategory(property.category);
            Property forgeProp;
            if (!category.containsKey(property.name)) {
                forgeProp = new Property(property.name, property.get().toString(), property.getType());
                forgeProp.comment = property.comment;
                category.put(property.name, forgeProp);
            } else {
                forgeProp = category.get(property.name);
                forgeProp.comment = property.comment;
            }
            setProperty(property, forgeProp);
        }
        config.save();
    }

    private void bind() {
        for (Field field : getClass().getDeclaredFields()) {
            if (field.getType().isAssignableFrom(ConfigProperty.class)) {
                try {
                    properties.add((ConfigProperty)field.get(this));
                } catch (IllegalAccessException ex) {
                    MyEssentialsCore.instance.LOG.error("Failed to access " + field.getName() + " while binding to config " + config.getConfigFile().getName());