UltimateUI guide
Interaction Handling
Handle user interactions and clicks via the Java Event API.
Use the specialized click event to capture detailed interaction data, such as click types and block IDs, allowing you to execute custom logic or override default actions.
| Method | Returns | Description |
|---|---|---|
getPlayer() | Player | The player who clicked. |
getPageName() | String | The name of the GUI page. |
getBlockId() | String | The ID of the clicked element (defined in YAML). |
getBlockLayer() | int | The layer index of the block. |
getClickType() | ClickType | Enum: LEFT, RIGHT, SCROLL_UP, SCROLL_DOWN. |
getCursorX/Y() | int | Exact cursor position at the moment of click. |
setCancelled(boolean) | void | If true, prevents the default YAML action from executing. |