add save to disk & backup to int & boolean setting gui.

This commit is contained in:
alexcrea 2024-02-29 19:36:42 +01:00 committed by alexcrea
parent 643487e1a9
commit c5dbbeb67c
8 changed files with 47 additions and 43 deletions

View file

@ -72,7 +72,7 @@ public abstract class ConfigHolder {
// Save logic
public boolean saveToDisk(boolean doBackup){
if(!doBackup){
if(doBackup){
if(!saveBackup()){
CustomAnvil.instance.getLogger().severe("Could not save backup. see above.");
return false;
@ -93,11 +93,10 @@ public abstract class ConfigHolder {
return false;
}
return true;
}
public boolean saveBackup(){
protected boolean saveBackup(){
File base = getConfigFile();
if(!base.exists()) return true; // We did back up everything we had to (nothing in this case)
boolean sufficientSuccess = false;