void UpdateTiers(object sender, ElapsedEventArgs e) { try { Tiers.Refresh(); TShock.Log.ConsoleInfo("CTRS: Refreshed tiers."); } catch (Exception ex) { TShock.Log.ConsoleError("CTRS: Exception thrown during tier refresh. Check logs for details."); TShock.Log.Error(ex.ToString()); } }
void OnReload(ReloadEventArgs e) { string path = Path.Combine(TShock.SavePath, "CTRSystem", "CTRS-Config.json"); Config = Configuration.ConfigFile.Read(path); if ((Config.TierRefreshMinutes * 60 * 1000) != _tierUpdateTimer.Interval) { _tierUpdateTimer.Interval = (Config.TierRefreshMinutes * 60 * 1000); } // Refresh tier data Tiers.Refresh(); }