protected override void ProcessRecord() { base.ProcessRecord(); if (CmdSite == null) { return; } ; WriteVerbose(string.Format("clear-cache on {0}", CmdSite.Url)); var response = HostCommands.ClearCache(CmdSite); WriteObject(response); }
public override void Entry(IModHelper helper) { Utilities.Helper = helper; this.Config = new ModConfig(Monitor, helper); hostCommands = new HostCommands(Config); userCommands = new UserCommands(Config); adminCommands = new AdminCommands(Config); helper.Events.GameLoop.OneSecondUpdateTicked += this.OnOneSecondUpdateTicked; helper.Events.GameLoop.Saved += this.OnSaved; var harmony = HarmonyInstance.Create(this.ModManifest.UniqueID); harmony.Patch( original: AccessTools.Method(typeof(StardewValley.Menus.ChatBox), nameof(StardewValley.Menus.ChatBox.receiveChatMessage)), postfix: new HarmonyMethod(typeof(ModEntry), nameof(ModEntry.receiveChatMessage_Postfix)) ); helper = this.Helper; }
public HostCommandStub() { Commands = new HostCommands(this); }