diff --git a/src/content/docs/adventure/minimessage/assets/hover_2.png b/src/content/docs/adventure/minimessage/assets/hover_2.png new file mode 100644 index 000000000..d80fd4c41 Binary files /dev/null and b/src/content/docs/adventure/minimessage/assets/hover_2.png differ diff --git a/src/content/docs/adventure/minimessage/format.mdx b/src/content/docs/adventure/minimessage/format.mdx index a272db9d0..37cf19253 100644 --- a/src/content/docs/adventure/minimessage/format.mdx +++ b/src/content/docs/adventure/minimessage/format.mdx @@ -5,6 +5,7 @@ description: The MiniMessage format documentation. --- import { Image } from "astro:assets"; +import { Badge } from "@astrojs/starlight/components"; import Shadow1 from "./assets/shadow_1.png"; import Shadow2 from "./assets/shadow_2.png"; import Shadow3 from "./assets/shadow_3.png"; @@ -16,6 +17,7 @@ import Decoration1 from "./assets/decoration_1.png"; import Reset1 from "./assets/reset_1.png"; import Click1 from "./assets/click_1.png"; import Hover1 from "./assets/hover_1.png"; +import Hover2 from "./assets/hover_2.png"; import Key1 from "./assets/key_1.png"; import Translatable1 from "./assets/translatable_1.png"; import Translatable2 from "./assets/translatable_2.png"; @@ -229,26 +231,60 @@ like the `/say` or `/tell` command to prevent the server from sending signed mes Allows doing multiple things when hovering on the component. Tag - * `` + * `` Arguments * `_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) - * `_value..._`, arguments specific to each event action: + * `_value_`, argument(s) specific to each event action: + +[//]: # (Starlight's padding doesn't apply for a spanned cell, so a manual padding is added) + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ActionValueDescription
`show_text`\_text_a MiniMessage string
`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 key value pairs
\_type_[:\_count_[:tag]]a `Key` for the item's type, optionally followed by count (an integer) and tag (a SNBT string)
`show_entity`\_type_:\_uuid_[:\_name_]a `Key` ID of the entity type, the entity's UUID, and an optional custom name
-| Action | Value | -|---------------|---------------------------------------------------------------------------------------------------------------------------| -| `show_text` | `_text_` (a MiniMessage string) | -| `show_item` | `_type_[:_count_[:tag]]` (a `Key` for the item's type, optionally followed by count (an integer) and tag (a SNBT string)) | -| `show_entity` | `_type_:_uuid_[:_name_]` (a `Key` ID of the entity type, the entity's UUID, and an optional custom name) | +:::caution +`_type_[:\_count_[:tag]]` value format for `show_item` action is considered legacy and support for it may eventually be removed. +The recommended format is `_type_[:\_count_[(:\_componentKey_:\_componentValue_)...]]`. +::: Examples ```mm test'>TEST ``` -
The result of parsing `<hover:show_text:'<red>test'>TEST`, shown in-game in the Minecraft client's chat window +```mm +Very sharp sword! +``` +
+<hover:show_item:diamond_sword:1:enchantments:'{sharpness:3,knockback:2}'>Very sharp sword!</hover> + ### Keybind Allows displaying the configured key for actions