Command/doc

**Error de Lua: callParserFunction: function "#dplvar" was not found.**

This template uses **Module:Command**, a script written in Lua.

Plantilla:Shortcut

This template is used to generate auto-formatted commands.

## Arguments

* To remove the forward slash, add `|/=0` or `|slash=0` to the template.
* To change the command name's link, add `|link=<link>` to the template.
* To remove the command name's link, add `|link=none` to the template.
* To add HTML in the command, add `|escape=0` to the template. It's then your responsibility to `<nowiki>` anything that looks like HTML but isn't.
* If a command is long and may go off the edge of the screen, add `|long=1` to the template. This allows the code to wrap as well as displaying it on its own line.

## Deprecated function

This template was previously used for autocompletion of commands. But the syntax of the commands change as the game updates, so we cannot ensure that the output of this template matches current version or the version described on the page. Besides this template doesn't support Bedrock Edition. So this feature is deprecated now.

See also Category:Pages using deprecated command module.
Plantilla:Collapse

This template is used to generate auto-formatted commands. Commands can either be pasted directly into the template (with or without a slash), or each parameter specified as a separate argument.

Any parameter that isn't specified or is set to an empty value or `?` will be replaced with the default parameter for the command, if it is a known command and a valid parameter. These parameters are formatted as Commands#Syntax.

## Arguments

* To output the rest of the command including optional parameters, add `...` to the template.
* To remove the forward slash, add `|/=0` or `|slash=0` to the template.
* To change the command name's link, add `|link=<link>` to the template.
* To remove the command name's link, add `|link=none` to the template.
* To add HTML in the command, add `|escape=0` to the template. It's then your responsibility to `<nowiki>` anything that looks like HTML but isn't.
* If a command is long and may go off the edge of the screen, add `|long=1` to the template. This allows the code to wrap as well as displaying it on its own line.

## Examples

{{cmd|kill}}
Plantilla:Cmd
{{cmd|say I'm saying stuff!}}
Plantilla:Cmd
{{cmd|op|...}}
Plantilla:Cmd
{{cmd|clear||diamond}}
Plantilla:Cmd
{{cmd|give ? diamond}}
Plantilla:Cmd
{{cmd|give ? diamond|...}}
Plantilla:Cmd
{{cmd|tp a ~ ~ ~ facing|...}}
Plantilla:Cmd
{{cmd|tp a ~ ~ ~ facing 1|...}}
Plantilla:Cmd
{{cmd|execute as ? run|...}}
Plantilla:Cmd
{{cmd|give ? command\_block{BlockEntityTag: {Command: "{{cmd|setblock ~ ~ ~ diamond\_block}}"}<nowiki/>} }}
Plantilla:Cmd
{{cmd|long=1|1= /data modify entity @e[x=0, y=64, z=0, type=dolphin, limit=1] Attributes[{Name: "generic.armor"}] merge from block|2=...}}
Plantilla:Cmd
## Notes

* You can use `{{cmd|execute run ?|...}}` to show all known commands' syntax.
* Commands containing equals signs or vertical pipes must be escaped to display correctly. For equals, if using a single argument place `1=` at the start of the command, otherwise replace each equals sign with `{{=}}`. For vertical pipes replace each one with `{{!}}`.
* Commands containing braces must be careful not to end with a brace or have two or more next to each other. In a case such as: `{{cmd|data {some:"data"}}}`, a space can simply be placed at the end of the command: `{{cmd|data {some:"data"} }}`, or place `<nowiki>` tags around the problem area.
* Texts in nowiki or other tags cannot be read by module. So placing spaces, bracket, braces or quotes into nowiki tags maybe makes it unable to separate parameters correctly. Please use self-closing tags, or enclose the whole parameter with nowiki. In a case such as: `{{cmd|data {some:{more:"data"}}}}`, use `nowiki` tags: `{{cmd|data {some:{more:"data"}<nowiki/>}<nowiki/>}}`, or `{{cmd|data <nowiki>{some:{more:"data"}}</nowiki>}}`, whatever is more readable.
* However it may be complex if a command contains multiple separate dataTags. In that case, use separate arguments for the parameters.

Plantilla:Collapse

es:Plantilla:Comando/doc
ko:틀:Command/doc
nl:Sjabloon:Opdracht/doc
pt:Predefinição:Comando/doc
ru:Шаблон:Команда/док