void Reload(CommandArgs e) { string path = Path.Combine(TShock.SavePath, "antispamconfig.json"); if (File.Exists(path)) Config = Config.Read(path); Config.Write(path); e.Player.SendSuccessMessage("Reloaded antispam config."); }
void OnInitialize(EventArgs e) { Commands.ChatCommands.Add(new Command("antispam.reload", Reload, "asreload")); string path = Path.Combine(TShock.SavePath, "antispamconfig.json"); if (File.Exists(path)) Config = Config.Read(path); Config.Write(path); }