Make config and kits path configurable #232
@ -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");
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren