Split gcmd sub cmds out n other stuff

This commit is contained in:
Seth
2020-07-31 21:10:44 -07:00
parent 891e5c2f12
commit 76bb2d08ac
21 changed files with 431 additions and 255 deletions

View File

@ -2,7 +2,10 @@ package me.totalfreedom.totalfreedommod;
import com.sk89q.worldedit.bukkit.BukkitConfiguration;
import java.io.File;
import me.totalfreedom.totalfreedommod.banning.PermbanList;
import me.totalfreedom.totalfreedommod.config.YamlConfig;
import me.totalfreedom.totalfreedommod.permissions.PermissionConfig;
import me.totalfreedom.totalfreedommod.punishments.PunishmentList;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.util.FileUtil;
@ -25,6 +28,15 @@ public class BackupManager extends FreedomService
createBackups(file, false);
}
public void createAllBackups()
{
createBackups(TotalFreedomMod.CONFIG_FILENAME, true);
createBackups(PermbanList.CONFIG_FILENAME);
createBackups(PermissionConfig.PERMISSIONS_FILENAME, true);
createBackups(PunishmentList.CONFIG_FILENAME);
createBackups("database.db");
}
public void createBackups(String file, boolean onlyWeekly)
{
final String save = file.split("\\.")[0];