diff --git a/eid_bagofcrafting_search.lua b/eid_bagofcrafting_search.lua index cc2a5e15..1c883b64 100644 --- a/eid_bagofcrafting_search.lua +++ b/eid_bagofcrafting_search.lua @@ -291,10 +291,16 @@ function EID:BoCSBlockInputAction(entity, inputHook, buttonAction) return nil end ---- Resets the search query when entering a new level (and starting a new game) +--- Resets the search query when entering a new level function EID:BoCSOnNewLevel() EID:BoCSSetSearchValue("") end +--- Resets the search query when starting and continuing a game +function EID:BoCSPostGameStarted() + EID:BoCSSetSearchValue("") +end + EID:BoCSHookInput() EID:AddCallback(ModCallbacks.MC_POST_NEW_LEVEL, EID.BoCSOnNewLevel) +EID:AddCallback(ModCallbacks.MC_POST_GAME_STARTED, EID.BoCSOnNewLevel)