add a config option to disable backups. closes #45
This commit is contained in:
@@ -33,6 +33,7 @@ import java.util.List;
|
||||
/**
|
||||
* A class for managing actual IO to the files, loading inventories, and saving them.
|
||||
*/
|
||||
@Deprecated
|
||||
public class VaultManager {
|
||||
|
||||
public PlayerVaults plugin;
|
||||
@@ -260,9 +261,9 @@ public class VaultManager {
|
||||
@Deprecated
|
||||
public void saveFile(String holder, YamlConfiguration yaml) throws IOException {
|
||||
File file = new File(directory + File.separator + holder.toLowerCase() + ".yml");
|
||||
if (file.exists()) {
|
||||
if (file.exists() && PlayerVaults.getInstance().isBackupsEnabled()) {
|
||||
file.renameTo(new File(PlayerVaults.getInstance().getBackupsFolder(), holder.toLowerCase() + ".yml"));
|
||||
}
|
||||
yaml.save(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user