Skip to content

Functional Key

Data Type

An object or string used for representing a keybind. If formatted as an object, this data type can execute an Entity Action Type.

Fields

Field Type Default Description
key String The name of the keybind.
continuous Boolean false Determines if the keybind can be pressed continuously if held.
action Entity Action optional If specified, this action will be executed on the player upon pressing the specified keybind.

Examples

"keys": [
    "key.forward"
]

This example represents the key.forward keybind, with its continuous and action fields having its default values: false and null respectively.

"keys": [
    {
        "key": "key.jump",
        "continuous": false,
        "action": {
            "type": "apoli:execute_command",
            "command": "me jumped!"
        }
    }
]

This example represents the key.jump keybind. Upon pressing the specified keybind, this will execute a /me jumped! command.