public MultiAdminConfig(Config config, MultiAdminConfig parentConfig) { Config = config; ParentConfig = parentConfig; if (!File.Exists(Config?.ConfigPath)) { try { if (Config?.ConfigPath != null) { File.Create(Config.ConfigPath).Close(); } } catch (Exception e) { new ColoredMessage[] { new ColoredMessage($"Error while creating config (Path = {Config?.ConfigPath ?? "Null"}):", ConsoleColor.Red), new ColoredMessage(e.ToString(), ConsoleColor.Red) }.WriteLines(); } } ReloadConfig(); }
public MultiAdminConfig(string path, MultiAdminConfig parentConfig) : this(new Config(path), parentConfig) { }