Repository navigation
JSON Arguments
For editing and creating commands directly as JSON, you'll have to write everything out manually. Here is the documentation for how new additions should be formatted.
Command data consists of two parts;
commands, which defines the command properties, andfunctions, which define their execution.
{
"commands": {},
"functions": {}
}Each command object is defined by a key, which is the name of the command. The object then contains the command attributes.
?- For more information about command attributes, see the wiki page Command Attributes.
"description"-str | string
"usages"-list[str] | string[]
"aliases"-list[str] | string[]
"permissions"-list[str] | string[]
"helloworld": {
"description": "Example command.",
"usages": ["/helloworld <message: str> <amount: int>"],
"aliases": ["hello", "hi"],
"permissions": ["easyas.command.all"],
}The functions object contains a list of every command's executions to enact when a command is ran.
Each function object is defined by a key, which is the name of the command. The object then contains the executions.
Each execution includes a
typeargument (the execution type), and acontentargument, which is the data to parse.?- For more information about executions, see the wiki page Functionality.
"command"- Executes a set command as the server.
?- If you are using an integration, you can use thenameof the custom type to reference it.
"helloworld": [
{
"type": "command",
"content": "say Hello, {0}!"
},
{
"type": "command",
"content": "give \"{player}\" diamond {1}"
}
]{
"commands": {
"helloworld": {
"description": "Example command.",
"usages": [
"/helloworld <message: str> <amount: int>"
],
"aliases": [
"hello",
"hi"
],
"permissions": [
"easyas.command.all"
]
}
},
"functions": {
"helloworld": [
{
"type": "command",
"content": "say Hello, {0}!"
},
{
"type": "command",
"content": "give \"{player}\" diamond {1}"
}
]
}
}