From cc486725cbac869e949070cdd25d907fd20617ae Mon Sep 17 00:00:00 2001 From: Yaruma3341 Date: Sun, 23 Feb 2020 23:13:10 +0100 Subject: [PATCH] hotfix --- src/de/steamwar/realtime/Config.java | 13 +++++++------ src/weather.yml | 2 -- 2 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 src/weather.yml diff --git a/src/de/steamwar/realtime/Config.java b/src/de/steamwar/realtime/Config.java index a0b6491..540fd47 100644 --- a/src/de/steamwar/realtime/Config.java +++ b/src/de/steamwar/realtime/Config.java @@ -17,14 +17,15 @@ public class Config { public static final boolean RealWeather; static { - if(!new File(instance.getDataFolder(), "weather.yml").exists()) { - instance.saveDefaultConfig(); + if(!new File(Bukkit.getWorlds().get(0).getWorldFolder(), "weather.yml").exists()) { Bukkit.getLogger().log(Level.SEVERE, "Config fehlt!"); - instance.shutdown(null); + RealTime = true; + RealWeather = false; + } else { + FileConfiguration config = instance.getConfig(); + RealTime = config.getBoolean("RealTime"); + RealWeather = config.getBoolean("RealWeather"); } - FileConfiguration config = instance.getConfig(); - RealTime = config.getBoolean("RealTime"); - RealWeather = config.getBoolean("RealWeather"); } diff --git a/src/weather.yml b/src/weather.yml deleted file mode 100644 index da4c7b4..0000000 --- a/src/weather.yml +++ /dev/null @@ -1,2 +0,0 @@ -RealTime: -RealWeather: \ No newline at end of file