You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add example of using data component key value pairs for hover:show_item tag format
* Replace Markdown table with HTML table for hover tag format documentation and add documentation for data component key value pairs
* Add badge and aside for legacy format warning
* Remove unused import
* Replace <code> tags with backticks
* chore: add markdown extension for table spanning
---------
Co-authored-by: Matouš Kučera <mk@kcra.me>
@@ -229,26 +231,38 @@ like the `/say` or `/tell` command to prevent the server from sending signed mes
229
231
Allows doing multiple things when hovering on the component.
230
232
231
233
Tag
232
-
*`<hover:_action_:_value..._>`
234
+
*`<hover:_action_:_value_>`
233
235
234
236
Arguments
235
237
*`_action_`, the type of hover event, one of this [list](https://jd.advntr.dev/api/latest/net/kyori/adventure/text/event/HoverEvent.Action.html#field.summary)
236
-
*`_value..._`, arguments specific to each event action:
238
+
*`_value_`, argument(s) specific to each event action:
|`show_item`|`_type_[:_count_[(:_componentKey_:_componentValue_)...]]`| a `Key` for the item's type, optionally followed by count (an integer) and a list of [data component](https://minecraft.wiki/w/Data_component_format) key value pairs |
245
+
| ^ | <spanstyle="padding-left: 1rem"><Badgevariant="caution"text="Legacy" /> `_type_[:_count_[:tag]]`</span> | a `Key` for the item's type, optionally followed by count (an integer) and tag (a [SNBT](https://minecraft.wiki/w/NBT_format#SNBT_format) string) |
246
+
|`show_entity`|`_type_:_uuid_[:_name_]`| a `Key` ID of the entity type, the entity's UUID, and an optional custom name |
247
+
248
+
:::caution
249
+
The `_type_[:_count_[:tag]]` value format for the `show_item` action is considered legacy and support for it may eventually be removed.
250
+
The recommended format is `_type_[:_count_[(:_componentKey_:_componentValue_)...]]`.
251
+
:::
243
252
244
253
Examples
245
254
```mm
246
255
<hover:show_text:'<red>test'>TEST
247
256
```
248
-
249
257
<br/>
250
258
<Imageclass="img-inline"alt="The result of parsing `<hover:show_text:'<red>test'>TEST`, shown in-game in the Minecraft client's chat window"src={Hover1} />
0 commit comments