mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-06-10 09:10:24 +02:00
28 lines
653 B
Java
28 lines
653 B
Java
package ellpeck.actuallyadditions.config;
|
|
|
|
import ellpeck.actuallyadditions.util.Util;
|
|
import net.minecraftforge.common.config.Configuration;
|
|
|
|
import java.io.File;
|
|
|
|
public class ConfigurationHandler{
|
|
|
|
public static void init(File configFile){
|
|
Util.logInfo("Grabbing Configurations...");
|
|
Configuration config = new Configuration(configFile);
|
|
|
|
try{
|
|
config.load();
|
|
ConfigValues.defineConfigValues(config);
|
|
}
|
|
catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
finally{
|
|
if(config.hasChanged()){
|
|
config.save();
|
|
}
|
|
}
|
|
|
|
}
|
|
} |