Copy the files correctly

This commit is contained in:
montlikadani 2019-08-23 16:29:12 +02:00
parent 68b69e2548
commit d303be4f82
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ public class WorldSystem extends JavaPlugin {
private CreatorAdapter creator;
public static void createConfigs() {
File folder = JavaPlugin.getPlugin(WorldSystem.class).getDataFolder();
File folder = getInstance().getDataFolder();
File dir = new File(folder + "/worldsources");
File config = new File(folder, "config.yml");
File dconfig = new File(folder, "dependence.yml");

View File

@ -45,8 +45,8 @@ public class MessageConfig {
if (in == null) {
in = JavaPlugin.getPlugin(WorldSystem.class).getResource("custom.yml");
Files.copy(in, file.toPath());
}
Files.copy(in, file.toPath());
} catch (IOException e) {
System.err.println("Wasn't able to create Message file");
e.printStackTrace();