Prevent Config from saving during loading process.

This commit is contained in:
AlgorithmX2
2014-06-19 16:15:34 -05:00
parent 77dcf6c5cf
commit 5c0ac30bf9
+6 -1
View File
@@ -96,6 +96,8 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
public int portablecell_battery = 20000; public int portablecell_battery = 20000;
public int staff_battery = 8000; public int staff_battery = 8000;
public boolean updateable = false;
public AEConfig(String path) { public AEConfig(String path) {
super( new File( path + "AppliedEnergistics2.cfg" ) ); super( new File( path + "AppliedEnergistics2.cfg" ) );
@@ -216,6 +218,8 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
latestTimeStamp = 0; latestTimeStamp = 0;
} }
} }
updateable = true;
} }
private String getListComment(Enum value) private String getListComment(Enum value)
@@ -252,7 +256,8 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
} }
} }
save(); if ( updateable )
save();
} }
@Override @Override