CustomActions
The CustomActions API is used to add and remove actions for the player. Currently, this is used by the Disguiser item and the Framed gamemode to implemented marking.
Functions
Section titled “Functions”Register
Section titled “Register”Registers a custom action, in the specified slot. If the slot is not available, the next slot will be used.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
| name | string | The name of the action. | |
| callback | () -> () | The callback to run when the action is triggered. | |
| preferredSlot | number? | The slot to register the action in. | |
| displayName | string? | The name to show the user. |
Returns
Section titled “Returns”()
Unregister
Section titled “Unregister”Unregisters a custom action. Does nothing if the action is not already registered.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
| name | string | The name of the action. |
Returns
Section titled “Returns”()