add a config option to disable backups. closes #45

This commit is contained in:
Joshua Popoff
2014-11-24 00:40:15 -08:00
parent e8bbd49804
commit b8b7c24d9d
4 changed files with 18 additions and 5 deletions
@@ -239,7 +239,7 @@ public class UUIDVaultManager {
*/
public void saveFile(UUID holder, YamlConfiguration yaml) throws IOException {
File file = new File(directory, holder.toString() + ".yml");
if (file.exists()) {
if (file.exists() && PlayerVaults.getInstance().isBackupsEnabled()) {
file.renameTo(new File(PlayerVaults.getInstance().getBackupsFolder(), holder.toString() + ".yml"));
}
yaml.save(file);