Code: Select all
opened :: LuaEntity or LuaItemStack or LuaEquipment or defines.gui_type [Read-Write]
The GUI target the player currently has open; nil if none.
Note: Write supports any of the types. Read will return the entity, equipment or nil.
edit: also on_event_gui_closed would be handy.
Call on_event_gui_opened when a window is opened, call on_event_gui_closed when a window is closed.
Ty