diff --git a/mods/CORE/BaseUI/src/BaseUI.lua b/mods/CORE/BaseUI/src/BaseUI.lua index 0c81278..ebdc453 100644 --- a/mods/CORE/BaseUI/src/BaseUI.lua +++ b/mods/CORE/BaseUI/src/BaseUI.lua @@ -30,6 +30,10 @@ function BaseUI:new(name, getFormSpecString, clearContex) end) end + instance:registerOnFormQuit(function(player) + Smc.clearActiveFormspec(player:get_player_name()) + end) + return instance end @@ -117,6 +121,7 @@ end ---@param playerName string function BaseUI:showForm(playerName, ...) core.show_formspec(playerName, self.name, self:getFormSpecString(playerName, ...)) + Smc.setActiveFormspec(playerName, self.name) end ---Close the player the FormSpec registered by the instance of this UI.