using Newtonsoft.Json; namespace Oxide.Plugins { [Info("Moved", "Mike Hawke", "1.0.1")] class Moved : RustPlugin { private ConfigData configData; class ConfigData { [JsonProperty(PropertyName = "Text")] public string msg = "We Have Moved. Use F1 type connect IP:PORT and hit enter"; } private bool LoadConfigVariables() { try { configData = Config.ReadObject(); } catch { return false; } SaveConfig(configData); return true; } void Init() { if (!LoadConfigVariables()) { Puts("Config file issue detected. Please delete file, or check syntax and fix."); return; } } protected override void LoadDefaultConfig() { Puts("Creating new config file."); configData = new ConfigData(); SaveConfig(configData); } void SaveConfig(ConfigData config) { Config.WriteObject(config, true); } object CanUserLogin(string name, string id, string ipAddress) { return configData.msg; } } }