From e6f84e5ae05b91d54c21075ecc30c7454230d024 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 14 Jun 2019 12:54:00 +0200 Subject: [PATCH] Fixing Pathbug 2 --- src/me/yaruma/fightsystem/utils/Config.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/me/yaruma/fightsystem/utils/Config.java b/src/me/yaruma/fightsystem/utils/Config.java index 461958a..5d44a2e 100644 --- a/src/me/yaruma/fightsystem/utils/Config.java +++ b/src/me/yaruma/fightsystem/utils/Config.java @@ -85,7 +85,7 @@ public class Config { public static int ObfuscateWith; public static void load(){ - if(!new File(Bukkit.getWorldContainer().getPath() + Bukkit.getWorlds().get(0) + "/config.yml").exists()) { + if(!new File(Bukkit.getWorldContainer().getPath() + '/' + Bukkit.getWorlds().get(0).getName() + "/config.yml").exists()) { FightSystem.getPlugin().saveDefaultConfig(); System.out.println(FightSystem.PREFIX + "config.yml erstellt und geladen!"); Bukkit.shutdown(); @@ -95,7 +95,7 @@ public class Config { Bukkit.shutdown(); } FileConfiguration config = FightSystem.getPlugin().getConfig(); - YamlConfiguration worldconfig = YamlConfiguration.loadConfiguration(new File(Bukkit.getWorldContainer().getPath() + Bukkit.getWorlds().get(0) + "/config.yml")); + YamlConfiguration worldconfig = YamlConfiguration.loadConfiguration(new File(Bukkit.getWorldContainer().getPath() + '/' + Bukkit.getWorlds().get(0).getName() + "/config.yml")); NoPlayerOnlineDuration = config.getInt("Times.NoPlayersOnlineDuration"); SetupDuration = config.getInt("Times.SetupDuration");