Diferencia entre revisiones de «Comandos»

Leynaf (discusión | contribs.)
Leynaf (discusión | contribs.)
Línea 963: Línea 963:
* [[attribute]]s
* [[attribute]]s


== Raw JSON Text ==
== Texto JSON sin formato ==


The {{cmd|tellraw}} command uses a specific [https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient%28boolean%29 lenient] [[wikipedia:JSON|JSON]] format for raw chat messages. Similar to the NBT format notation above, concepts such as Strings, Objects (Compounds), and Lists are used to represent the various properties of raw chat.
El comando {{cmd|tellraw}} utiliza un formato específico de [https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient%28boolean%29 lenient] [[wikipedia:JSON|JSON]] para los mensajes de chat sin formato. Al igual que el formato de notación NBT anteriormente expuestos, conceptos tales como cadenas (Strings), objetos ((Objects) compuestos)), y listas se utilizan para representar las diversas propiedades de del chat sin formato.


For a direct tutorial to tellraw commands, see [http://www.minecraftforum.net/topic/1975697-174-tellraw-formatting-examples-updated-to-14w02c this thread]. For a tool to easily create tellraw commands, [http://ezekielelin.com/tellraw see this]. Note that both links are external to the Minecraft Wiki and may be outdated<!--Then again, the Wiki usually is too. But, at the time of this writing, the Wiki is a step ahead-->.
Para ver un tutorial directo de comandos tellraw , consulte [http://www.minecraftforum.net/topic/1975697-174-tellraw-formatting-examples-updated-to-14w02c este hilo]. Para una herramienta que cree fácilmente los comandos tellraw, [http://ezekielelin.com/tellraw consulta esto]. Hay que tener en cuenta que ambos enlaces son externos al Minecraft Wiki y pueden estar obsoletos <!-- Por otra parte, la Wiki por lo general es demasiado. Pero, en el momento de escribir esto, la Wiki es un paso adelante -->.


The format of "<''raw JSON message''>" is a JSON Object which supports the following (mostly optional) elements:
El formato de "<''raw JSON message''>" es un ''JSON Object'' que soporta los siguientes elementos (en su mayoría opcionales):
<div class="treeview">
<div class="treeview">
* {{nbt|compound}} The base chat component Object
* {{nbt|compound}} The base chat component Object
Línea 1002: Línea 1002:
</div>
</div>


Due to the '''extra''' tag, the above format may be recursively nested to produce very complex and functional text strings. However, a raw json string doesn't have to be complicated at all: virtually all properties are optional and may be left out.
Debido a la etiqueta '''extra''', el formato anterior puede estar anidado de forma recursiva para producir cadenas de texto muy complejas y funcionales. Sin embargo, una cadena json sin formato no tiene por qué ser complicado en absoluto: prácticamente todas las propiedades son opcionales y pueden ser dejados de lado.


To be valid, each object must have at least either '''text''', '''translate''', or '''score''' (everything else is optional). As a matter of shorthand, however, the entire Object may be substituted for a String. In this case, that string will be considered the value of the '''text''' property. For example, <code>"This is raw text"</code> is equivalent to <code>{text:"This is raw text"}</code>. This shorthand substitution is valid anywhere a raw text object is required (including the base <''raw json message''> argument of {{cmd|tellraw}}, the elements of the '''extra''' list, and the '''value''' of a "show_text" '''hover_event''').
Para que sea válida, cada objeto debe tener al menos '''text''', '''translate''', o '''score''' (todo lo demás es opcional). Como cuestión de taquigrafía, sin embargo, todo el objeto puede ser sustituido por una cadena (string). En este caso, esa cadena se considerará el valor de la propiedad de '''text'''. Por ejemplo, <code>"Esto es texto sin formato"</code> es equivalente a <code>{text:"Esto es texto sin formato"}</code>. Esta sustitución taquigrafía es válida en cualquier lugar requiere de un objeto de texto sin formato (incluida la base <''mensaje json sin formato''> argumento de {{cmd|tellraw}}, los elementos de la lista '''extra''', y el '''valor''' de un "show_text" '''hover_event''').


Finally, unlike other commands using JSON, {{cmd|tellraw}} Strings support Unicode via the notation <code>\u####</code>, where #### is the Unicode hexadecimal number for the desired character.
Por último, a diferencia de otros comandos que utilizan JSON, las cadenas de {{cmd|tellraw}} soportan Unicode a través de la notación code>\u####</code>, donde #### es el número hexadecimal Unicode para el carácter deseado.


== Historia ==
== Historia ==