IGF

object IGF : Listener

Main handler for the InventoryGUI framework (IGF). It manages global listeners, event handling, and NamespacedKey initialization.

Properties

Link copied to clipboard
lateinit var ID: String
Link copied to clipboard
val logger: Logger

Functions

Link copied to clipboard
fun createKey(vararg name: String): NamespacedKey

Creates a new NamespacedKey with the given name parts. The key is created using the initialized plugin ID.

Link copied to clipboard
fun init(plugin: JavaPlugin, nameSpace: String)

Initializes the IGF with the given plugin and registers the events.

Link copied to clipboard
fun onInventoryClick(event: InventoryClickEvent)

Handles inventory click events. Cancels clicks on the background material by default and delegates to the appropriate listener.

Link copied to clipboard
fun onInventoryClose(event: InventoryCloseEvent)

Handles inventory close events. Delegates to the appropriate listener if set.

Link copied to clipboard
fun onInventoryOpen(event: InventoryOpenEvent)

Handles inventory open events. Delegates to the appropriate listener if set.

Link copied to clipboard

Sets the global listener for all GUIs managed by IGF.