/// <exception cref="NullReferenceException">if setting does not exist or is of a different type</exception> public static T GetSetting <T>(SettingName name) where T : struct { ServerSettings instance = Instance; SettingSimple <T> set = instance.AllSettings[name] as SettingSimple <T>; return(set.Value); }
private static void SetSetting <T>(SettingName name, T value) where T : struct { ServerSettings instance = Instance; SettingSimple <T> set = instance.AllSettings[name] as SettingSimple <T>; set.Value = value; Logger.AlwaysLog("Setting " + name + " = " + value, Rynchodon.Logger.severity.INFO); }