Skip to content

Execute Command

Item Action Type

Executes a command with the entity holding the item stack as the source. (e.g: @s will select the entity itself)

Type ID: eggolib:execute_command

Fields Type Default Description
command String The command to execute.

Examples

"item_action": {
    "type": "eggolib:execute_command",
    "command": "say Hello world!"
}

This example will execute the /say Hello world! command as the entity that is holding the item stack.