package net.joaopms.PvPUtilities.helper;

import net.minecraftforge.common.config.Configuration;

import java.io.File;

public class ConfigHelper {
    private static Configuration config;

    public static void init(File file) {
        config = new Configuration(file, true);

        config.load();
        initConfig();
        config.save();
    }

    public static Configuration getConfig() {
        return config;
    }

    private static void initConfig() {
        config.get("overcastStatistics", "showOvercastLogo", true);
        config.get("overcastStatistics", "showKills", true);
        config.get("overcastStatistics", "showDeaths", true);
        config.get("overcastStatistics", "showFriends", false);
        config.get("overcastStatistics", "showKD", true);
        config.get("overcastStatistics", "showKK", false);
        config.get("overcastStatistics", "showServerJoins", false);
        config.get("overcastStatistics", "showDaysPlayed", false);
        config.get("overcastStatistics", "showRaindrops", false);

        config.get("overcastStatistics", "overlayOpacity", 0.5F);
    }
}