-
Notifications
You must be signed in to change notification settings - Fork 12
Buttons
Buttons are rendered as items into the inventory.
They can be configured to execute Actions on click, manipulate the ItemStack to render, and more.
Each button requires at least one ButtonState that contains the data to render it and run custom functions.
See ButtonStates for more info about how they work.
There are a couple of different types of Buttons that you can use.
They just display an ItemStack without any action on click. They can call any of the Button Functions except the ButtonAction!
Those are the most customizable Buttons.
They can run actions when clicked, manipulate the ItemStack it renders, and more.
See Button Functions to see what can be configured.
This Button requires two ButtonStates that are static and won't change and will toggle between them each interaction.
Each state is handled the same as an ActionButton with all its functionality.
As the name suggests, the functionality is to prompt the player for chat input, receive it and use it.
The click will always be canceled so you won't be able to take out the item.
The ButtonAction however can cancel the input prompt if they return false.
The main use of this Button is when you need a Button with multiple states, that don't change, and you can go through it by clicking. Each state is handled the same as an ActionButton with all its functionality.
| Home
| Registry
-
Introduction
- Structure
- InventoryAPI
- Register GuiCluster
- CustomCache
- GuiClusters
- GuiWindow
-
Buttons
- Dummy
- Action
- Toggle
- ChatInput
- MultipleChoice
-
ButtonStates
- ButtonFunctions
- ButtonAction
- ButtonPostAction
- ButtonPreRender
- ButtonRender
- ButtonFunctions