示例#1
0
        /// <summary>
        /// LoadConfig loads the config from file, if missing it loads and saves the default config
        /// </summary>
        protected override void LoadConfig()
        {
            base.LoadConfig();

            try
            {
                config = Config.ReadObject <JuicedRconConfig>();
            }
            finally
            {
                if (config == null)
                {
                    LoadDefaultConfig();
                    SaveConfig();
                }
            }
        }
示例#2
0
 /// <summary>
 /// LoadDefaultConfig initializes the default config for the plugin
 /// </summary>
 protected override void LoadDefaultConfig()
 {
     config = new JuicedRconConfig();
 }