public void LoadConfig() { try { Config = DSConfig.Read(ConfigPath).Write(ConfigPath); ParseNotifyIntervals(); } catch (Exception ex) { TShock.Log.ConsoleError("[Delayed Stop] An exception occoured while parsing the config, check the logs for more details!"); TShock.Log.Error(ex.ToString()); Config = new DSConfig(); } }
public void ReloadConfig(CommandArgs args) { try { Config = DSConfig.Read(ConfigPath).Write(ConfigPath); ParseNotifyIntervals(); args.Player.SendSuccessMessage("Reloaded DelayedStop Config!"); } catch (Exception ex) { args.Player.SendErrorMessage("[Delayed Stop] An exception occoured while parsing the config, check the logs for more details!"); TShock.Log.Error("[Delayed Stop] An exception occoured while parsing the config, check the logs for more details!\n" + ex.ToString()); Config = new DSConfig(); } }