SteamWar/FightSystem
Archiviert
13
1

Fixing Pathbug 2

Dieser Commit ist enthalten in:
Travis CI 2019-06-14 12:54:00 +02:00
Ursprung 9ad5512c13
Commit e6f84e5ae0

Datei anzeigen

@ -85,7 +85,7 @@ public class Config {
public static int ObfuscateWith; public static int ObfuscateWith;
public static void load(){ 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(); FightSystem.getPlugin().saveDefaultConfig();
System.out.println(FightSystem.PREFIX + "config.yml erstellt und geladen!"); System.out.println(FightSystem.PREFIX + "config.yml erstellt und geladen!");
Bukkit.shutdown(); Bukkit.shutdown();
@ -95,7 +95,7 @@ public class Config {
Bukkit.shutdown(); Bukkit.shutdown();
} }
FileConfiguration config = FightSystem.getPlugin().getConfig(); 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"); NoPlayerOnlineDuration = config.getInt("Times.NoPlayersOnlineDuration");
SetupDuration = config.getInt("Times.SetupDuration"); SetupDuration = config.getInt("Times.SetupDuration");