Skip to content

Commit

Permalink
add messages.yml to BackupCommand.java
Browse files Browse the repository at this point in the history
  • Loading branch information
NONPLAYT committed Sep 2, 2023
1 parent 960c30b commit 1278e03
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import gq.bxteam.ndailyrewards.NDailyRewards;
import gq.bxteam.ndailyrewards.cfg.Lang;
import gq.bxteam.ndailyrewards.cmds.ICmd;
import gq.bxteam.ndailyrewards.utils.logs.LogUtil;
import org.bukkit.command.CommandSender;

import java.io.File;
Expand All @@ -26,11 +25,14 @@ public void perform(final CommandSender sender, final String[] args) {

File configFile = new File(pluginFolder, "config.yml");
File dataFile = new File(pluginFolder, "data.db");
File messagesFile = new File(pluginFolder, "messages.yml");
File backupConfigFile = new File(backupFolder, "config.yml");
File backupDataFile = new File(backupFolder, "data.db");
File backupMessagesFile = new File(backupFolder, "messages.yml");
try {
Files.copy(configFile.toPath(), backupConfigFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
Files.copy(dataFile.toPath(), backupDataFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
Files.copy(messagesFile.toPath(), backupMessagesFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
sender.sendMessage(Lang.Prefix.toMsg() + "Successfully backed up files!");
}
catch (Exception ex) {
Expand Down

0 comments on commit 1278e03

Please sign in to comment.