Beispiel #1
0
        private void LoadConfig()
        {
            var config = new PluginConfig("VoteRewards", this);

            if (!config.Exists)
            {
                config.Write(Config.Init());
            }
            else
            {
                Config = config.Read <VoteConfig>();
            }

            if (Config.Service == null)
            {
                Logger.LogWarning("[VoteRewards] You didn't provide any voting service. This plugin cannot be used.");
                return;
            }

            /*
             * if(!VoteRewards.URL_REGEX.IsMatch(VoteRewards.Config.Service.CheckUrl))
             * {
             *  Logger.LogWarning("[VoteRewards] The url you inserted is invalid. This plugin cannot be used.");
             *  return;
             * }
             */
        }
Beispiel #2
0
        private void LoadConfig()
        {
            PluginConfig cfg = new PluginConfig("UKits", this);

            if (!cfg.Exists)
            {
                cfg.Write(config.Init());
            }
            else
            {
                config = cfg.Read <KitsConfig>();
            }
        }