commandblock.getCommand

From ComputerCraft
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽

commandblock.getCommand
Function
Syntax
commandblock.getCommand()
Returns string command
API commandblock
Source CC:Tweaked (source)

Returns the command from a commandblock.

Note Note: The commandblock peripheral is disabled by default. You have to enable it in the config before using it.

ExampleExampleGet command
Get Command and print it.
Code
local commandblockr = peripheral.find("command")
print(commandblock.getCommand())
Output
kill @a