set Binding
Binds a character to an AbstractItemProvider. This allows you to use the specified character in the structure of the GUI to indicate where the item provided by the AbstractItemProvider should be displayed. When the GUI is built, any occurrence of the specified character in the structure will be replaced with the item from the AbstractItemProvider.
Note that the character ' ' (space) cannot be used for bindings. Additionally, each character can only be bound to one AbstractItemProvider, so if you try to bind a character that has already been used, an IllegalArgumentException will be thrown.
Parameters
The character to bind to the AbstractItemProvider.
The AbstractItemProvider that will provide the item to display in the GUI for any occurrence of the specified character in the structure.
A convenience method for binding a character to a SimpleItemProvider that provides a specific ItemStack. This allows you to easily bind a character in the structure to a static item without needing to create a separate AbstractItemProvider class for it. The method creates a new SimpleItemProvider with the provided ItemStack and binds it to the specified character.
Note that the character ' ' (space) cannot be used for bindings. Additionally, each character can only be bound to one AbstractItemProvider, so if you try to bind a character that has already been used, an IllegalArgumentException will be thrown.
Parameters
The character to bind to the SimpleItemProvider.
The ItemStack that will be provided by the SimpleItemProvider.
Binds a character to a VirtualInventory. This allows you to use the specified character in the structure of the GUI to indicate where the items from the VirtualInventory should be displayed. When the GUI is built, any occurrence of the specified character in the structure will be associated with the VirtualInventory, and the items from that inventory will be displayed in those slots according to the specified direction (horizontal or vertical). Note that the character ' ' (space) cannot be used for bindings. Additionally, each character can only be bound to one VirtualInventory, so if you try to bind a character that has already been used, an IllegalArgumentException will be thrown.
Parameters
The character to bind to the VirtualInventory.
The VirtualInventory that will be associated with any occurrence of the specified character in the structure. The items from this inventory will be displayed in the GUI in the slots corresponding to that character.
The direction in which the items from the VirtualInventory should be laid out in the GUI. If HORIZONTAL, the items will be displayed in a row from left to right. If VERTICAL, the items will be displayed in a column from top to bottom. The default is HORIZONTAL.
An optional ID for the virtual inventory. If not specified, a unique ID will be automatically assigned incrementally (starting from 0) based on the number of virtual inventory bindings.