commands.list
From ComputerCraft Wiki
| Available only to Command Computers, returns a numerically indexed table filled with strings representing acceptable commands for commands.exec() / commands.execAsync(). This function yields internally and might 'eat' some events, such as rednet_message or key. | |
| Syntax | commands.list() |
| Returns | table commands |
| Part of | ComputerCraft |
| API | commands |
Examples
| Prints all the available commands. | |
| Code |
local commands = commands.list() textutils.pagedTabulate( commands ) |
| Output | Under ComputerCraft 1.7:
gamemode give scoreboard tp kill spreadplayers xp difficulty gamerule clear time help defaultgamemode weather me tell achievement tellraw testforblock seed playsound forge msg spawnpoint setblock w toggledownfall effect say setworldspawn summon testfor ? enchantMay vary under later versions. |
| |
|---|
| commands.exec - commands.execAsync - commands.list - commands.getBlockPosition - commands.getBlockInfo - commands.getBlockInfos |