This peripheral allows you to interact with command blocks.
Command blocks are only wrapped as peripherals if the
enable_command_block option is true within the
This API is not the same as the commands API, which is exposed on command computers.
|runCommand()||Execute the command block once.|
|getCommand()||Get the command this command block will run.|
|setCommand(command)||Set the command block's command.|
Execute the command block once.
- boolean If the command completed successfully.
- string | nil A failure message.
Get the command this command block will run.
- string The current command.
Set the command block's command.
- command string The new command.