Skip to content

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.

Registers a custom action, in the specified slot. If the slot is not available, the next slot will be used.

NameTypeDefaultDescription
namestringThe name of the action.
callback() -> ()The callback to run when the action is triggered.
preferredSlotnumber?The slot to register the action in.
displayNamestring?The name to show the user.

()

Unregisters a custom action. Does nothing if the action is not already registered.

NameTypeDefaultDescription
namestringThe name of the action.

()