Both sides previous revisionPrevious revisionNext revision | Previous revision |
library:minedown:syntax [2020/11/23 18:23] – Add gradient and rainbow information phoenix616 | library:minedown:syntax [2025/04/29 15:13] (current) – Add translatable phoenix616 |
---|
===== Inline Formatting ===== | ===== Inline Formatting ===== |
| |
| **Description** | **Syntax** | **More Info** | | | **Description** | **Syntax** | **Preview** | **More Info** | |
| Color legacy |` &6Text `| [Formatting codes](https://minecraft.gamepedia.com/Formatting_codes) | | | Color legacy |` &6Text `|  | [Formatting codes](https://minecraft.wiki/w/Formatting_codes) | |
| Color |` &gold&Text `| [Color names](https://minecraft.gamepedia.com/Formatting_codes) | | | Color |` &gold&Text `|  | [Color names](https://minecraft.wiki/w/Formatting_codes) | |
| RGB Hex Color |` &#ff00ff&Text `| Full hexadecimal format | | | RGB Hex Color |` &#ff00ff&Text `|  | Full hexadecimal format | |
| RGB Hex Color |` &#f0f&Text `| Short format (equivalent to long one) | | | RGB Hex Color |` &#f0f&Text `|  | Short format (equivalent to long one) | |
| Gradient |` &#f0f-#000&Text `| Inline gradients | | | Gradient |` &#f0f-#fff&Text `|  | Inline gradients | |
| Rainbow |` &rainbow&Text `| Inline Rainbow | | | Rainbow |` &rainbow&Text `|  | Inline Rainbow | |
| Rainbow Phase |` &rainbow:20&Text `| Inline Rainbow with a phase | | | Rainbow Phase |` &rainbow:20&Text `|  | Inline Rainbow with a phase | |
| Bold |` **Text** `| | | | Bold |` **Text** `|  | | |
| Italic |` ##Text## `| | | | Italic |` ##Text## `|  | | |
| Underlined |` __Text__ `| | | | Underlined |` __Text__ `|  | | |
| Strikethrough |` ~~Text~~ `| | | | Strikethrough |` ~~Text~~ `|  | | |
| Obfuscated |` ??Text?? `| | | | Obfuscated |` ??Text?? `|  | | |
| |
===== Events ===== | ===== Events ===== |
==== Advanced Syntax ==== | ==== Advanced Syntax ==== |
| |
| **Description** | **Syntax** | **More Info** | | | **Description** | **Syntax** | **More Info** | |
| General syntax |` [Text](action=value) `| [ClickEvent.Action](https://ci.md-5.net/job/BungeeCord/ws/chat/target/apidocs/net/md_5/bungee/api/chat/ClickEvent.Action.html), [HoverEvent.Action](https://ci.md-5.net/job/BungeeCord/ws/chat/target/apidocs/net/md_5/bungee/api/chat/HoverEvent.Action.html) | | | General syntax | ` [Text](action=value) ` | [ClickEvent.Action](https://github.com/KyoriPowered/adventure/blob/master/api/src/main/java/net/kyori/adventure/text/event/ClickEvent.java#L196-L222), [HoverEvent.Action](https://github.com/KyoriPowered/adventure/blob/master/api/src/main/java/net/kyori/adventure/text/event/HoverEvent.java#L311-L339) | |
| Link |` [Text](open_url=https://example.com) `| | | Link | ` [Text](open_url=https://example.com) ` | | |
| Color |` [Text](color=red) `| [Color names](https://minecraft.gamepedia.com/Formatting_codes) | | | Color | ` [Text](color=red) ` | [Color names](https://minecraft.wiki/w/Formatting_codes) | |
| RGB Hex Color |` [Text](color=#ff00ff) `| Full hexadecimal format | | | RGB Hex Color | ` [Text](color=#ff00ff) ` | Full hexadecimal format | |
| RGB Hex Color |` [Text](color=#f0f) `| Short format (equivalent to long one) | | | RGB Hex Color | ` [Text](color=#f0f) ` | Short format (equivalent to long one) | |
| RGB Color Gradient |` [Text](color=#fff-#000) `| Gradient of two colors. (Supports all color forms) | | | RGB Color Gradient | ` [Text](color=#fff-#000) ` | Gradient of two colors. (Supports all color forms) | |
| RGB Color Gradient |` [Text](color=#fff-#333-#222) `| Gradient of three colors. | | | RGB Color Gradient | ` [Text](color=#fff-#333-#222) ` | Gradient of three colors. | |
| RGB Rainbow |` [Text](color=rainbow) `| An RGB rainbow. | | | RGB Rainbow | ` [Text](color=rainbow) ` | An RGB rainbow. | |
| Phased RGB Rainbow |` [Text](color=rainbow:50) `| An RGB rainbow with a specific phase. | | | Phased RGB Rainbow | ` [Text](color=rainbow:50) ` | An RGB rainbow with a specific phase. | |
| Formatting |` [Text](format=underline,bold) `| | | | Formatting | ` [Text](format=underline,bold) ` | Specify formatting | |
| Font |` [Text](font=custom_font) `| Set a custom font from a resource pack | | | Disable Formatting | ` [Text](format=!underline) ` | Disable the specific formatting with a ! prefix | |
| Run Command |` [Text](run_command=/command string) `| Run command on click | | | Font | ` [Text](font=custom_font) ` | Set a custom font from a resource pack | |
| Suggest Command |` [Text](suggest_command=/command) `| Suggest a command on click | | | Translatable | ` [fallback](translate=translation.key with={value1, value2}) ` | Translatable component with optional replacements | |
| Simple Hover |` [Text](hover=Hover Text) `| Show hover text | | | Run Command | ` [Text](run_command=/command string) ` | Run command on click | |
| Hover Text |` [Text](show_text=Hover Text) `| Show hover text | | | Suggest Command | ` [Text](suggest_command=/command) ` | Suggest a command on click | |
| Hover Entity Info |` [Text](show_entity=uuid:pig Name) `| Show entity information. | | | Simple Hover | ` [Text](hover=Hover Text) ` | Show hover text | |
| Hover Item Info |` [Text](show_item=stone*2 nbt...) `| Show item information, additional information needs to be provided as a string of the nbt in json | | | Hover Text | ` [Text](show_text=Hover Text) ` | Show hover text | |
| | Hover Entity Info | ` [Text](show_entity=uuid:pig Name) ` | Show entity information. | |
| | Hover Item Info | ` [Text](show_item=stone*2 nbt...) ` | Show item information, additional information needs to be provided as a string of the nbt in json | |
| | Insertion | ` [Text](insert=insert into input) ` | Insert into input on shift click, can be combined with other events | |
| |
All advanced settings can be chained/included in a event definition. | All advanced settings can be chained/included in an event definition by writing them after each other separated by a **space**. |
You can't however add multiple different colors or click and hover actions! | You can't however add multiple different colors or click and hover actions! |