Make config and kits path configurable #232
@ -151,18 +151,18 @@ public class Config {
|
|||||||
public static final int spectatePort = 2222;
|
public static final int spectatePort = 2222;
|
||||||
|
|
||||||
static{
|
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()) {
|
if(!new File(IFightSystem.getPlugin().getDataFolder(), System.getProperty("config", "config.yml")).exists()) {
|
||||||
IFightSystem.getPlugin().saveDefaultConfig();
|
IFightSystem.getPlugin().saveDefaultConfig();
|
||||||
Bukkit.getLogger().log(Level.SEVERE, "Arenaconfig fehlt!");
|
Bukkit.getLogger().log(Level.SEVERE, "Arenaconfig fehlt!");
|
||||||
IFightSystem.shutdown(null);
|
IFightSystem.shutdown(null);
|
||||||
}
|
}
|
||||||
FileConfiguration config = IFightSystem.getPlugin().getConfig();
|
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);
|
FileConfiguration worldconfig = YamlConfiguration.loadConfiguration(worldConfigFile);
|
||||||
|
|
||||||
NoPlayerOnlineDuration = config.getInt("Times.NoPlayersOnlineDuration");
|
NoPlayerOnlineDuration = config.getInt("Times.NoPlayersOnlineDuration");
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren