Each server has a Consolethat can be connected to by server owners. The Consoleallows for spawning of items, teleporting of players, and many more abilities. It can be connected to via the Dashboard, or through a custom bot or tool using a library like js-tale or att-websockets.
All communication done with the Consoleis through 'statements', a line of text that can contain commands, or more advanced Consolefeatures.
Contents
- 1 Commands and Responses
- 1.1 Modules
- 1.2 Command syntax
- 1.3 List of modules and commands
- 2 Statements (Future Feature)
- 2.1 Data accessors
- 2.2 Inner statements
Commands and Responses[ | ]
At the core of the Consoleis a collection of commands. Commands may do things (eg. spawn an item), or simply access data. After a command has run, it returns a response. A response may contain information (eg. the ID of the spawned item), be empty (successful, but have no additional information), or contain an error.
Modules[ | ]
Modules are collections of commands. They can also contain submodules to further categorize commands.
Command syntax[ | ]
A command is invoked through is full path (modules and command name (if any)), as well as any arguments.
For instance, the module
has a submodule called spawn
, which has a command called list
. This command takes no arguments.To invoke this command, the following statement would be used:materials
.spawn list materials
As a second example, the module `spawn` also has an unnamed (aka. 'default') command, with 3 parameters: the players, the prefab, and arguments.To invoke this command, the following statement could be used:spawn Joel stone 10
List of modules and commands[ | ]
An up to date list of all modules, commands, and their parameters can be found on the right hand side in the dashboard after connecting to a server.
If you want to parse the data yourself, you can also invoke the command `help modules`.
Statements (Future Feature)[ | ]
Note: This feature does not exist yet, but is planned for the future.
A statement can be much more than a single command. Statements can also include inner statements, data accessors, math operators, logic operators, and more.
Data accessors[ | ]
In a basic statement, containing nothing but a single command, the command returns a result, and that result is then passed back as a response from the Console. For example,
might return player list
.[ { "id":100, "username":"Joel" }, { "id":200, "username":"Narmdo" } ]
Data can be manipulated to return information in a format more useful for your situation. In this case, the data being dealt with is an array. If only the names were needed, the statement
could be used to return player list.select.username
.[ "Joel", "Narmdo" ]
Inner statements[ | ]
A statement can be