registerGui

fun registerGui(gui: Gui, inventoryId: Int)

Registers a GUI to receive updates from this virtual inventory. When a GUI is registered, it will be notified of any changes to the inventory and can update its display accordingly. The inventoryId parameter is used to identify which virtual inventory the GUI is associated with, allowing for multiple virtual inventories to be managed by the same GUI if needed.

Parameters

gui

The GUI to register with this virtual inventory.

inventoryId

An integer identifier for the virtual inventory, used to associate the GUI with this specific inventory.