12
1

Make config and kits path configurable #232

Manuell gemergt
Lixfel hat 2 Commits von dynamicConfig nach master 2021-02-13 08:19:07 +01:00 zusammengeführt
Nur Änderungen aus Commit 0027c6c69b werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -151,18 +151,18 @@ public class Config {
public static final int spectatePort = 2222;
static{
File worldConfigFile = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "config.yml");
if(!worldConfigFile.exists()) {
Bukkit.getLogger().log(Level.SEVERE, "Weltconfig fehlt!");
IFightSystem.shutdown(null);
}
if(!new File(IFightSystem.getPlugin().getDataFolder(), System.getProperty("config", "config.yml")).exists()) {
IFightSystem.getPlugin().saveDefaultConfig();
Bukkit.getLogger().log(Level.SEVERE, "Arenaconfig fehlt!");
IFightSystem.shutdown(null);
}
FileConfiguration config = IFightSystem.getPlugin().getConfig();
File worldConfigFile = new File(Bukkit.getWorlds().get(0).getWorldFolder(), config.getString("Arenaconfig", "config.yml"));
if(!worldConfigFile.exists()) {
Bukkit.getLogger().log(Level.SEVERE, "Weltconfig fehlt!");
IFightSystem.shutdown(null);
}
FileConfiguration worldconfig = YamlConfiguration.loadConfiguration(worldConfigFile);
NoPlayerOnlineDuration = config.getInt("Times.NoPlayersOnlineDuration");