Better defaults for the config stuff

This commit is contained in:
Bernhard Bonigl committed 2016-10-02 11:49:17 +02:00
1 parent 339941cac2
commit c5060223ce
2 files changed
+9 -2

No files matched your search

@@ -38,7 +38,15 @@ public abstract class AbstractConfigFile implements Serializable {
private final File file;
private final ConfigurationLoader<CommentedConfigurationNode> loader;
private boolean needsSaving = false;
// default value is TRUE since most people will forget to set it to true when it needs saving anyway
// if you want to use it, set it to false in your constructor or something ;o
private boolean needsSaving = true;
// required constructor for deserialization
public AbstractConfigFile() {
file = null;
loader = null;
}
public AbstractConfigFile(File configFolder, String name) {
this(new File(configFolder, name + ".cfg"));
@@ -6,7 +6,6 @@ import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.text.TextComponentString;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent;