investigating: error on Files#copy

This commit is contained in:
aro 2022-12-21 10:35:07 +01:00
parent dbc1da0c2c
commit 4fba6bfd33
2 changed files with 5 additions and 5 deletions

View file

@ -23,7 +23,7 @@ public class NickoConfiguration {
public ConfigurationSection getStorageSection() { return getConfig().getConfigurationSection("storage"); }
public ConfigurationSection getLocaleSection() { return getBungeecordSection().getConfigurationSection("locale"); }
public ConfigurationSection getLocaleSection() { return getConfig().getConfigurationSection("locale"); }
public ConfigurationSection getRedisSection() { return getBungeecordSection().getConfigurationSection("redis"); }

View file

@ -4,6 +4,8 @@ import net.artelnatif.nicko.NickoBukkit;
import java.io.*;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.Arrays;
import java.util.Properties;
@ -34,10 +36,8 @@ public class LocaleManager {
try {
if (resource != null) {
if (!file.exists()) {
instance.getLogger().info("Installed Custom language file as \"custom.properties\"");
Files.copy(resource, file.toPath());
}
instance.getLogger().info("Installing custom language file as \"custom.properties\"");
Files.copy(resource, Paths.get(file.toURI()), StandardCopyOption.REPLACE_EXISTING);
}
} catch (IOException e) {
// TODO: 12/19/22 Handle error