mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
add save to disk & backup to int & boolean setting gui.
This commit is contained in:
parent
643487e1a9
commit
c5dbbeb67c
8 changed files with 47 additions and 43 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue