From 55c3e624f7420e1f2e93a396cdef5189885062d9 Mon Sep 17 00:00:00 2001 From: kuba6000 Date: Fri, 5 Aug 2022 01:16:57 +0200 Subject: Empty minecraft mod --- src/main/java/kubaworks/Config.java | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/main/java/kubaworks/Config.java (limited to 'src/main/java/kubaworks/Config.java') diff --git a/src/main/java/kubaworks/Config.java b/src/main/java/kubaworks/Config.java new file mode 100644 index 0000000000..d0bcb0ebfd --- /dev/null +++ b/src/main/java/kubaworks/Config.java @@ -0,0 +1,35 @@ +/* + * kubaworks - Gregtech Addon + * Copyright (C) 2022 kuba6000 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +package kubaworks; + +import java.io.File; +import net.minecraftforge.common.config.Configuration; + +public class Config { + + public static void syncronizeConfiguration(File configFile) { + Configuration configuration = new Configuration(configFile); + configuration.load(); + + if (configuration.hasChanged()) { + configuration.save(); + } + } +} -- cgit