Button
data class Button @JvmOverloads constructor(val slot: Int, val material: Material, val name: Component, val data: Map<NamespacedKey, DataWrapper<out Any, out Any>> = emptyMap(), var onClick: ClickEvent? = null, val skipGUIListenerCall: Boolean = true)
Represents a button in an inventory GUI. This class is used to define the properties and behavior of a button, including its material, display name, custom data, and click action.
Since
1.1.0
Author
RiriFa
Constructors
Link copied to clipboard
constructor(slot: Int, material: Material, name: Component, data: Map<NamespacedKey, DataWrapper<out Any, out Any>> = emptyMap(), onClick: ClickEvent? = null, skipGUIListenerCall: Boolean = true)
Properties
Functions
Link copied to clipboard
Adds a click handler to the button without overwriting the existing one. The new click handler is called after the existing click handler when the button is clicked.
Link copied to clipboard
Link copied to clipboard
Sets or replaces a single persistent data entry in the button.
Link copied to clipboard
Converts the button's material, display name, and custom data into an ItemStack.