private void OpenBagHook_CL(Action <Player> callback, Player plr) { Action <ScrapedSentData> listener = (d) => { int itemWho = d.Number; Item item = Main.item[itemWho]; if (item?.active != true) { return; } this.ProcessBagItem(plr, item); }; // Scraper.IsScrapingSentData = true; Scraper.AddSendDataListener(listener); callback.Invoke(plr); Scraper.IsScrapingSentData = false; Scraper.RemoveSendDataListener(listener); }