### Get Default MiniMessage Instance Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/MiniMessage.html Retrieves a default instance of MiniMessage with standard settings. This is a simple way to get started with MiniMessage without custom configurations. ```java @NotNull static @NotNull MiniMessage miniMessage() ``` -------------------------------- ### Get Transition TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Obtains a TagResolver for the 'transition' tag, likely used for animated text effects. ```Java public static TagResolver transition() Get a resolver for the "transition" tag. Returns: a resolver for the "transition" tag Since: 4.10.0 ``` -------------------------------- ### Get Gradient TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Provides a TagResolver for the 'gradient' tag, enabling the creation of gradient color effects within text. ```Java @NotNull public static @NotNull TagResolver gradient() Get a resolver for the "gradient" tag. Returns: a resolver for the "gradient" tag Since: 4.10.0 ``` -------------------------------- ### Get Keybind TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Provides a TagResolver for keybind tags, which can be used to display in-game keybinds within the text. ```Java @NotNull public static @NotNull TagResolver keybind() Get a resolver for the "key" tag. Returns: a resolver for the "key" tag Since: 4.10.0 ``` -------------------------------- ### Get Default MiniMessage Instance (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/MiniMessage.html Retrieves a simple, default instance of MiniMessage with standard settings. This is a convenient way to get a functional MiniMessage object without custom configuration. ```java static @NotNull MiniMessage miniMessage() ``` -------------------------------- ### Create MiniMessage Builder (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/MiniMessage.html Initializes and returns a new builder instance for configuring and creating MiniMessage objects. This is the starting point for customizing MiniMessage behavior. This method is available since version 4.10.0. ```Java static MiniMessage.Builder builder() ``` -------------------------------- ### Get Rainbow TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Retrieves a TagResolver for the 'rainbow' tag, which applies a rainbow color effect to text. ```Java @NotNull public static @NotNull TagResolver rainbow() Get a resolver for the "rainbow" tag. Returns: a resolver for the "rainbow" tag Since: 4.10.0 ``` -------------------------------- ### Get Sequential Head TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Retrieves a TagResolver for the 'head' tag, supporting an alternative shorthand for specifying head textures or names. This is particularly useful for player heads. ```Java @NotNull public static @NotNull TagResolver sequentialHead() Get a resolver for the "head" tag. This variant of the head tag handles an alternative shorthand way of writing the head tag ``. Returns: a resolver for the "head" tag. Since: 4.25.0 Since Minecraft: 1.21.9 ``` -------------------------------- ### Create MiniMessage Builder (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/MiniMessage.html This method creates a new builder instance for configuring and creating a MiniMessage object. It's the starting point for customizing MiniMessage behavior. ```java public static MiniMessage.Builder builder() ``` -------------------------------- ### Get Reset TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Provides a TagResolver for the 'reset' tag, which is used to remove all applied formatting and return text to its default state. ```Java @NotNull public static @NotNull TagResolver reset() Get a resolver for the "reset" tag. Returns: a resolver for the "reset" tag. Since: 4.10.0 ``` -------------------------------- ### Get Pride TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Obtains a TagResolver for the 'pride' tag, likely used for applying rainbow-like color effects associated with pride flags. ```Java @NotNull public static @NotNull TagResolver pride() Get a resolver for the "pride" tag. Returns: a resolver for the "pride" tag Since: 4.18.0 ``` -------------------------------- ### Get Translatable Fallback TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Provides a TagResolver for the 'translate_or' tag, also responding to 'lang_or' and 'tr_or'. This allows for fallback translations. ```Java @NotNull public static @NotNull TagResolver translatableFallback() Get a resolver for the "translate_or" tag. This tag also responds to "lang_or" and "tr_or". Returns: a resolver for the "translate_or" tag Since: 4.13.0 ``` -------------------------------- ### Get Shadow Color TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Provides a TagResolver for the 'shadow' tags, supporting hexadecimal color strings. This is used to apply shadow effects to text. ```Java @NotNull public static @NotNull TagResolver shadowColor() Get a resolver for the "shadow" tags. This tag support both hex string Returns: a resolver for the "shadow" tags Since: 4.18.0 ``` -------------------------------- ### Get Default TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Retrieves a TagResolver instance that automatically handles all default standard tags provided by MiniMessage. This method is useful for quickly setting up a resolver without manually defining each tag. Future versions of MiniMessage may introduce new tags that are not enabled by default and require explicit opt-in. ```java @NotNull public static @NotNull TagResolver defaults() Get a resolver that handles all default standard tags. This will currently return all standard tags, but in the future MiniMessage may add tags that are not enabled by default, and which must explicitly be opted-in to. Returns: the resolver for built-in tags Since: 4.10.0 ``` -------------------------------- ### Get Hover Event TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Retrieves a TagResolver specifically for hover events. This allows text to trigger actions or display information when a user hovers over it. ```Java @NotNull public static @NotNull TagResolver hoverEvent() Get a resolver for the "hover" tag. Returns: a resolver for the "hover" tag Since: 4.10.0 ``` -------------------------------- ### Get Click Event TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Obtains a TagResolver for click events, enabling text to perform actions when clicked, such as opening a URL or executing a command. ```Java @NotNull public static @NotNull TagResolver clickEvent() Get a resolver for the "click" tag. Returns: a resolver for the "click" tag Since: 4.10.0 ``` -------------------------------- ### Get All Decoration Tags Resolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Obtains a TagResolver for all available decoration tags. Similar to the single decoration resolver, this method supports standard names and aliases, allowing for broad application of text styles. ```Java @NotNull public static @NotNull TagResolver decorations() Get a resolver for all decoration tags. This tag supports both standard names from `TextDecoration.NAMES` as well as a few aliases from `DecorationTag`. Returns: a resolver for all decoration tags Since: 4.10.0 ``` -------------------------------- ### Get Decoration TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Retrieves a TagResolver for a specific text decoration. This method supports standard decoration names and aliases. It's useful for applying styles like bold, italic, or strikethrough to text. ```Java @NotNull public static @NotNull TagResolver decorations(@NotNull @NotNull TextDecoration decoration) Get a resolver for a specific text decoration. This tag supports both the standard names from `TextDecoration.NAMES` as well as a few aliases from `DecorationTag`. Parameters: `decoration` - the decoration to have a tag for Returns: a resolver for a certain decoration's tags Since: 4.10.0 ``` -------------------------------- ### Joining Components API (Varargs) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/resolver/Formatter.html Creates a replacement that inserts a list of components joined together. Supports optional separator, last separator, and last separator if serial arguments. ```APIDOC ## POST /api/text/minimessage/joining/varargs ### Description Creates a replacement that inserts a list of components. These components are joined together by `Component.join(JoinConfiguration.Builder, ComponentLike...)`. This tag has three optional arguments; a separator, a last separator, and a last separator if serial. Each argument must be provided in order, with all preceding arguments present. The exact use of these three separators is documented in `JoinConfiguration`. This replacement is auto-closing, so its style will not influence the style of following components. ### Method POST ### Endpoint /api/text/minimessage/joining/varargs ### Parameters #### Query Parameters - **key** (string) - Required - The key for the replacement. - **components** (array) - Required - An array of components to join. - **separator** (string) - Optional - The separator between components. - **lastSeparator** (string) - Optional - The separator before the last component. - **lastSeparatorIfSerial** (string) - Optional - The separator before the last component if there are multiple components. ### Request Example ```json { "key": "list_items", "components": ["Red", "Green", "Blue"], "separator": " | ", "lastSeparator": " or " } ``` ### Response #### Success Response (200) - **placeholder** (string) - The joined string of components. #### Response Example ```json { "placeholder": "Red | Green or Blue" } ``` ``` -------------------------------- ### Create Translatable Component with MiniMessageTranslator Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/translation/MiniMessageTranslator.html Demonstrates how to construct a translatable component using the MiniMessageTranslator. This includes specifying the translation key, arguments, and custom tag resolvers. The arguments can be accessed via index or name, and custom tags can be added for styling or other purposes. ```java Component.translatable( "my.translation.key", // the translation key, you'd return the MiniMessage string by implementing getMiniMessageString Component.text("hello"), // available as or Argument.string("today", "monday"), // available as , or Argument.tag("danger", Tag.styling(NamedTextColor.RED)), // available as , or , can be closed if needed Argument.tagResolver(StandardTags.pride()) // you can even add arbitrary tag resolvers! ); ``` -------------------------------- ### Placeholder Creation Methods Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/resolver/Placeholder.html This section details the static methods available in the Placeholder class for creating various types of tag resolvers, which act as placeholders. ```APIDOC ## Placeholder Tag Resolvers ### Description Provides static methods to create `TagResolver.Single` instances for inserting dynamic content into MiniMessage strings. ### Methods #### `parsed(@NotNull String key, @NotNull String value)` Creates a placeholder that inserts a MiniMessage string. The inserted string will impact the rest of the parse process. * **Parameters**: * `key` (String) - Required - The placeholder key. * `value` (String) - Required - The MiniMessage string to insert. * **Returns**: * `TagResolver.Single` - The created placeholder. * **Since**: * 4.10.0 #### `unparsed(@NotNull String key, @NotNull String value)` Creates a placeholder that inserts a literal string, without attempting to parse any contained tags. * **Parameters**: * `key` (String) - Required - The placeholder key. * `value` (String) - Required - The literal string to insert. * **Returns**: * `TagResolver.Single` - The created placeholder. * **Since**: * 4.10.0 #### `component(@NotNull String key, @NotNull ComponentLike value)` Creates a replacement that inserts a component. This replacement is auto-closing, so its style will not influence the style of following components. * **Parameters**: * `key` (String) - Required - The placeholder key. * `value` (ComponentLike) - Required - The component to insert. * **Returns**: * `TagResolver.Single` - The created placeholder. * **Since**: * 4.10.0 #### `styling(@NotNull String key, @NotNull StyleBuilderApplicable... style)` Creates a style tag which will modify the style of the component. This style can be used like other styles. * **Parameters**: * `key` (String) - Required - The placeholder key. * `style` (StyleBuilderApplicable...) - Required - The styles to apply. * **Returns**: * `TagResolver.Single` - The created placeholder. * **Since**: * 4.13.0 ### Request Example ```json { "key": "myPlaceholder", "value": "This is a placeholder value" } ``` ### Response Example ```json { "placeholderType": "parsed" | "unparsed" | "component" | "styling", "key": "myPlaceholder", "value": "..." } ``` ``` -------------------------------- ### MiniMessage Builder Methods Source: https://jd.advntr.dev/text-minimessage/4.26.1/index-all.html Methods for configuring the MiniMessage builder, including tag resolution and virtual component emission. ```APIDOC ## MiniMessage Builder Configuration ### editTags(Consumer) **Description**: Add to the set of known tags this MiniMessage instance can use. **Method**: N/A (Method within an interface) **Endpoint**: N/A ### emitVirtuals(boolean) **Description**: Configures if MiniMessage should emit virtual components (enabled by default). **Method**: N/A (Method within an interface) **Endpoint**: N/A ``` -------------------------------- ### Get Insertion TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Retrieves a TagResolver for the 'insert' tag, which is used to insert text at the cursor position. ```Java @NotNull public static @NotNull TagResolver insertion() Get a resolver for the "insert" tag. Returns: a resolver for the "insert" tag Since: 4.10.0 ``` -------------------------------- ### ArgumentQueue Methods Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/resolver/ArgumentQueue.html This section details the methods available for interacting with the ArgumentQueue, including peeking, popping, and checking for argument availability. ```APIDOC ## ArgumentQueue Interface ### Description A queue of `Tag` arguments. Since: 4.10.0 ## Method Summary ### Instance Methods - **hasNext**(): `boolean` - Get whether another argument is available to be popped. - **peek**(): `@Nullable Tag.Argument` - Peek at the next argument without advancing the iteration pointer. - **pop**(): `@NotNull Tag.Argument` - Pop an argument, throwing an exception if no argument was present. - **popOr**(`@NotNull String errorMessage`): `@NotNull Tag.Argument` - Pop an argument, throwing an exception if no argument was present. - **popOr**(`@NotNull Supplier errorMessage`): `@NotNull Tag.Argument` - Pop an argument, throwing an exception if no argument was present. - **reset**(): `void` - Reset index to the beginning, to begin another attempt. ## Method Details ### pop #### Description Pop an argument, throwing an exception if no argument was present. After an invocation of `pop()`, the internal argument pointer will be advanced to the next argument. #### Method `@NotNull Tag.Argument pop()` #### Returns - the popped argument (`@NotNull Tag.Argument`) #### Since 4.10.0 ### popOr (String) #### Description Pop an argument, throwing an exception if no argument was present. After an invocation of `popOr()`, the internal argument pointer will be advanced to the next argument. #### Method `@NotNull Tag.Argument popOr(@NotNull String errorMessage)` #### Parameters - **errorMessage** (`@NotNull String`) - the error to throw if the argument is not present #### Returns - the popped argument (`@NotNull Tag.Argument`) #### Since 4.10.0 ### popOr (Supplier) #### Description Pop an argument, throwing an exception if no argument was present. After an invocation of `popOr()`, the internal argument pointer will be advanced to the next argument. #### Method `@NotNull Tag.Argument popOr(@NotNull Supplier errorMessage)` #### Parameters - **errorMessage** (`@NotNull Supplier`) - the error to throw if the argument is not present #### Returns - the popped argument (`@NotNull Tag.Argument`) #### Since 4.10.0 ### peek #### Description Peek at the next argument without advancing the iteration pointer. #### Method `@Nullable Tag.Argument peek()` #### Returns - the next argument, if any is available (`@Nullable Tag.Argument`) #### Since 4.10.0 ### hasNext #### Description Get whether another argument is available to be popped. #### Method `boolean hasNext()` #### Returns - whether another argument is available (`boolean`) #### Since 4.10.0 ### reset #### Description Reset index to the beginning, to begin another attempt. #### Method `void reset()` #### Since 4.10.0 ``` -------------------------------- ### Get Score TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Provides a TagResolver for the 'score' tag, used for displaying player scores within the text. ```Java @NotNull public static @NotNull TagResolver score() Get a resolver for the "score" tag. Returns: a resolver for the "score" tag Since: 4.13.0 ``` -------------------------------- ### net.kyori.adventure.text.minimessage.tag.standard.TransitionTag Source: https://jd.advntr.dev/text-minimessage/4.26.1/constant-values.html Information about the TransitionTag used for animated text effects in Minimessage. ```APIDOC ## net.kyori.adventure.text.minimessage.tag.standard.TransitionTag ### Description Represents a tag used for creating animated text transitions in Minimessage. ### Method N/A (Class Documentation) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (N/A) N/A #### Response Example N/A ### Constants #### `TRANSITION` - **Type**: `String` - **Value**: `"transition"` - **Description**: The string identifier for the transition tag. ``` -------------------------------- ### Get Font TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Obtains a TagResolver for the 'font' tag, allowing the use of custom fonts in text components. ```Java @NotNull public static @NotNull TagResolver font() Get a resolver for the "font" tag. Returns: a resolver for the "font" tag Since: 4.10.0 ``` -------------------------------- ### Argument Creation API Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/translation/Argument.html This section details the static methods available in the Argument class for creating various types of named arguments for translatable components. ```APIDOC ## Argument Creation Methods ### Description Provides static methods to create named arguments for translatable components. These arguments are represented as virtual components that the MiniMessage translator uses to replace tags. ### Methods #### `argument(@NotNull String name, @NotNull TranslationArgument argument)` * **Description**: Creates a named translation argument. * **Method**: static * **Parameters**: * `name` (String) - Required - The name of the argument, used for the tag. * `argument` (TranslationArgument) - Required - The translation argument value. #### `argument(@NotNull String name, @NotNull TranslationArgumentLike argument)` * **Description**: Creates a named translation argument. * **Method**: static * **Parameters**: * `name` (String) - Required - The name of the argument, used for the tag. * `argument` (TranslationArgumentLike) - Required - The translation argument value. #### `bool(@NotNull String name, boolean value)` * **Description**: Creates a named boolean argument. * **Method**: static * **Parameters**: * `name` (String) - Required - The name of the argument, used for the tag. * `value` (boolean) - Required - The boolean value. #### `component(@NotNull String name, @NotNull ComponentLike value)` * **Description**: Creates a named component argument. * **Method**: static * **Parameters**: * `name` (String) - Required - The name of the argument, used for the tag. * `value` (ComponentLike) - Required - The component value. #### `numeric(@NotNull String name, @NotNull Number value)` * **Description**: Creates a named numeric argument. * **Method**: static * **Parameters**: * `name` (String) - Required - The name of the argument, used for the tag. * `value` (Number) - Required - The numeric value. #### `string(@NotNull String name, @NotNull String value)` * **Description**: Creates a named string argument. * **Method**: static * **Parameters**: * `name` (String) - Required - The name of the argument, used for the tag. * `value` (String) - Required - The string value. #### `tag(@NotNull String name, @NotNull Tag tag)` * **Description**: Creates a named tag argument. * **Method**: static * **Parameters**: * `name` (String) - Required - The name of the argument, used for the tag. * `tag` (Tag) - Required - The tag value. #### `tagResolver(@NotNull Iterable resolvers)` * **Description**: Creates an argument used to add arbitrary tag resolvers to the deserialization process. * **Method**: static * **Parameters**: * `resolvers` (Iterable) - Required - An iterable of tag resolvers. #### `tagResolver(@NotNull TagResolver tagResolver)` * **Description**: Creates an argument used to add arbitrary tag resolvers to the deserialization process. * **Method**: static * **Parameters**: * `tagResolver` (TagResolver) - Required - A tag resolver. #### `tagResolver(@NotNull TagResolver... resolvers)` * **Description**: Creates an argument used to add arbitrary tag resolvers to the deserialization process. * **Method**: static * **Parameters**: * `resolvers` (TagResolver...) - Required - An array of tag resolvers. #### `target(@NotNull Pointered target)` * **Description**: Creates an argument used to set the target of the deserialization process. * **Method**: static * **Parameters**: * `target` (Pointered) - Required - The target for deserialization. ``` -------------------------------- ### Joining Components API (Iterable) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/resolver/Formatter.html Creates a replacement that inserts a list of components joined together. Supports optional separator, last separator, and last separator if serial arguments. ```APIDOC ## POST /api/text/minimessage/joining/iterable ### Description Creates a replacement that inserts a list of components. These components are joined together by `Component.join(JoinConfiguration.Builder, ComponentLike...)`. This tag has three optional arguments; a separator, a last separator, and a last separator if serial. Each argument must be provided in order, with all preceding arguments present. The exact use of these three separators is documented in `JoinConfiguration`. This replacement is auto-closing, so its style will not influence the style of following components. ### Method POST ### Endpoint /api/text/minimessage/joining/iterable ### Parameters #### Query Parameters - **key** (string) - Required - The key for the replacement. - **components** (array) - Required - An iterable of components to join. - **separator** (string) - Optional - The separator between components. - **lastSeparator** (string) - Optional - The separator before the last component. - **lastSeparatorIfSerial** (string) - Optional - The separator before the last component if there are multiple components. ### Request Example ```json { "key": "list_items", "components": ["Apple", "Banana", "Orange"], "separator": ", ", "lastSeparator": " and " } ``` ### Response #### Success Response (200) - **placeholder** (string) - The joined string of components. #### Response Example ```json { "placeholder": "Apple, Banana and Orange" } ``` ``` -------------------------------- ### PreProcess Tag Documentation Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/PreProcess.html Details about the PreProcess tag, including its purpose, usage, and methods. ```APIDOC ## PreProcess Tag ### Description A tag that is applied at the tokenization stage, before the tree is constructed. Its value must be a MiniMessage string. ### Method `value()` ### Endpoint N/A (This is a tag, not an API endpoint) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example N/A ### Response #### Success Response (200) This tag does not directly return a response in the traditional API sense. It modifies the input string during processing. #### Response Example N/A ### Value - **value** (String) - Required - The MiniMessage string value to insert at the pre-process phase. ### Since 4.10.0 ``` -------------------------------- ### Get Standard TagResolver Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/resolver/TagResolver.html Retrieves the default tag resolver that handles all standard tags. This is commonly used by parsers. ```java TagResolver standard() { // Implementation omitted for brevity return null; } ``` -------------------------------- ### Get Newline TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Retrieves a TagResolver for the 'newline' tag, also responding to 'br'. This is used to insert line breaks in text. ```Java @NotNull public static @NotNull TagResolver newline() Get a resolver for the "newline" tag. This tag also responds to "br". Returns: a resolver for the "newline" tag. Since: 4.10.0 ``` -------------------------------- ### Tag Resolvers Source: https://jd.advntr.dev/text-minimessage/4.26.1/index-all.html Information on standard tags and how to create custom tag resolvers. ```APIDOC ## GET /api/minimessage/tags/nbt ### Description Gets a resolver for the "nbt" tag. ### Method GET ### Endpoint /api/minimessage/tags/nbt ### Parameters None ### Request Example None ### Response #### Success Response (200) - **resolver** (TagResolver) - The NBT tag resolver. #### Response Example ```json { "resolver": "[TagResolver Details]" } ``` ``` ```APIDOC ## GET /api/minimessage/tags/newline ### Description Gets a resolver for the "newline" tag. ### Method GET ### Endpoint /api/minimessage/tags/newline ### Parameters None ### Request Example None ### Response #### Success Response (200) - **resolver** (TagResolver) - The newline tag resolver. #### Response Example ```json { "resolver": "[TagResolver Details]" } ``` ``` -------------------------------- ### Argument Queue Methods Source: https://jd.advntr.dev/text-minimessage/4.26.1/index-all.html Methods for interacting with an argument queue during tag processing. ```APIDOC ## Argument Queue ### hasNext() **Description**: Get whether another argument is available to be popped. **Method**: N/A (Method within an interface) **Endpoint**: N/A ``` -------------------------------- ### Get Translatable TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Obtains a TagResolver for the 'translate' tag, which also responds to 'lang' and 'tr'. This is used for displaying localized text. ```Java @NotNull public static @NotNull TagResolver translatable() Get a resolver for the "translate" tag. This tag also responds to "lang" and "tr". Returns: a resolver for the "translate" tag Since: 4.10.0 ``` -------------------------------- ### TransitionTag API Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/TransitionTag.html Details about the TransitionTag, including its purpose, fields, and methods. ```APIDOC ## TransitionTag ### Description Changes the color based on a phase parameter. Since: 4.10.0 ### Fields #### TRANSITION `public static final String TRANSITION` ### Methods #### value `@NotNull Component value()` Returns the component this tag produces. #### examinableProperties `@NotNull Stream examinableProperties()` #### equals `boolean equals(Object other)` Overrides: `equals` in class `Object` #### hashCode `int hashCode()` Overrides: `hashCode` in class `Object` ``` -------------------------------- ### MiniMessage Core API Source: https://jd.advntr.dev/text-minimessage/4.26.1/index-all.html Provides methods for creating and managing MiniMessage instances, and basic parsing functionalities. ```APIDOC ## GET /api/minimessage ### Description Retrieves a default instance of MiniMessage. ### Method GET ### Endpoint /api/minimessage ### Parameters None ### Request Example None ### Response #### Success Response (200) - **instance** (MiniMessage) - A default MiniMessage instance. #### Response Example ```json { "instance": "[MiniMessage Instance Details]" } ``` ``` ```APIDOC ## POST /api/minimessage/parse ### Description Parses a given string into a MiniMessage component. ### Method POST ### Endpoint /api/minimessage/parse ### Parameters #### Request Body - **text** (string) - Required - The text to parse. ### Request Example ```json { "text": "Hello, World!" } ``` ### Response #### Success Response (200) - **component** (Component) - The parsed Adventure component. #### Response Example ```json { "component": "[Adventure Component Details]" } ``` ``` -------------------------------- ### ParsingException Constructors Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/ParsingException.html Information on the different constructors available for creating ParsingException objects. ```APIDOC ## Constructors ### `protected ParsingException(String message)` Create a new parsing exception with only a message. **Parameters:** * `message` (String) - a detail message describing the error **Since:** 4.10.0 ### `protected ParsingException(String message, Throwable cause)` Create a new parsing exception with a message and an optional cause. **Parameters:** * `message` (String) - a detail message describing the error * `cause` (Throwable) - the cause **Since:** 4.10.0 ### `protected ParsingException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace)` Create a new parsing exception with a message and an optional cause. **Parameters:** * `message` (String) - a detail message describing the error * `cause` (Throwable) - the cause * `enableSuppression` (boolean) - whether suppression is enabled or disabled * `writableStackTrace` (boolean) - whether the stack trace should be writable **Since:** 4.13.0 ``` -------------------------------- ### Create TagResolver Builder Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/resolver/TagResolver.html Creates a new builder for constructing tag resolvers. This is the entry point for creating custom tag resolver logic. ```java TagResolver.Builder builder() { // Implementation omitted for brevity return null; } ``` -------------------------------- ### Get NBT TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Retrieves a TagResolver for the 'nbt' tag, also responding to 'data'. This allows for the display of Named Binary Tag (NBT) data. ```Java @NotNull public static @NotNull TagResolver nbt() Get a resolver for the "nbt" tag. This tag also responds to "data". Returns: a resolver for the "nbt" tag. Since: 4.13.0 ``` -------------------------------- ### Create Named Component Argument Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/translation/Argument.html Creates a named component argument with the specified name and a ComponentLike value. ```APIDOC ## POST /api/componentlike/component ### Description Creates a named component argument. ### Method POST ### Endpoint /api/componentlike/component ### Parameters #### Query Parameters - **name** (string) - Required - The name of the argument. - **value** (object) - Required - The ComponentLike value of the argument. ### Request Example ```json { "name": "header", "value": { "type": "string", "value": "Welcome!" } } ``` ### Response #### Success Response (200) - **componentLike** (object) - The created ComponentLike object. #### Response Example ```json { "componentLike": { "type": "component", "name": "header", "value": { "type": "string", "value": "Welcome!" } } } ``` ``` -------------------------------- ### TagResolver API Overview Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/resolver/package-summary.html This section provides an overview of the TagResolver API, including its core components and their functionalities. ```APIDOC ## TagResolver API Overview ### Description This API provides tools for resolving tags based on tag information. It is a core part of customizing how MiniMessage interprets and processes text. ### Related Packages * **net.kyori.adventure.text.minimessage.tag**: Specification of the API for customizing tags understood by MiniMessage. * **net.kyori.adventure.text.minimessage.tag.standard**: Built-in tags shipped with MiniMessage. ### Key Classes and Interfaces #### Interfaces * **ArgumentQueue**: Represents a queue of `Tag` arguments. * **TagResolver**: A collection of known tags, serving as the primary interface for tag resolution. #### Classes * **Formatter**: Tag resolvers that produce tags inserting formatted values. * **Placeholder**: Tag resolvers that produce tags inserting fixed values. * **TagResolver.Builder**: A builder pattern implementation for gradually constructing `TagResolver` instances. * **TagResolver.Single**: A specific `TagResolver` that handles only a single tag key. * **TagResolver.WithoutArguments**: A `TagResolver` designed to handle tags that do not accept any arguments. ``` -------------------------------- ### Get Sprite TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Retrieves a TagResolver for the 'sprite' tag. This is used for displaying sprites or custom textures within the text, particularly useful in newer Minecraft versions. ```Java @NotNull public static @NotNull TagResolver sprite() Get a resolver for the "sprite" tag. Returns: a resolver for the "sprite" tag. Since: 4.25.0 Since Minecraft: 1.21.9 ``` -------------------------------- ### Get Base Tag Resolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/MiniMessage.html Returns the base TagResolver associated with this MiniMessage instance. This resolver contains the default tag definitions used by the instance. ```java @NotNull TagResolver tags() ``` -------------------------------- ### MiniMessageTranslator Constructors Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/translation/MiniMessageTranslator.html Constructors for creating a MiniMessageTranslator instance. ```APIDOC ## Constructor Details ### MiniMessageTranslator `public MiniMessageTranslator()` Constructor for a MiniMessageTranslator using the default MiniMessage instance. Since: 4.20.0 See Also: * `MiniMessage.miniMessage()` ### MiniMessageTranslator `public MiniMessageTranslator(@NotNull @NotNull MiniMessage miniMessage)` Constructor for a MiniMessageTranslator using a specific MiniMessage instance. Parameters: * `miniMessage` - the MiniMessage instance Since: 4.20.0 See Also: * `MiniMessage.miniMessage()` ``` -------------------------------- ### Choice Replacement API Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/resolver/Formatter.html Creates a replacement that inserts choice-formatted text. Expects a format attribute compatible with ChoiceFormat. ```APIDOC ## POST /api/text/minimessage/choice ### Description Creates a replacement that inserts a choice formatted text. The component will be formatted by the provided ChoiceFormat. This tag expectes a format as attribute. Refer to `ChoiceFormat` for usable patterns. This replacement is auto-closing, so its style will not influence the style of following components. ### Method POST ### Endpoint /api/text/minimessage/choice ### Parameters #### Query Parameters - **key** (string) - Required - The key for the replacement. - **number** (number) - Required - The number to use for choice formatting. - **format** (string) - Required - The ChoiceFormat pattern to use. ### Request Example ```json { "key": "item_count", "number": 5, "format": "0# items|1# item|{2,choice,0# no items|1# one item|2<{2} items}" } ``` ### Response #### Success Response (200) - **placeholder** (string) - The choice-formatted replacement string. #### Response Example ```json { "placeholder": "5 items" } ``` ``` -------------------------------- ### Get Color TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Provides a TagResolver for color tags, supporting both hexadecimal color strings and named colors. This is fundamental for applying custom colors to text components. ```Java @NotNull public static @NotNull TagResolver color() Get a resolver for the "color" tags. This tag supports both hex string colors as well as named colors. Returns: a resolver for the "color" tags Since: 4.10.0 ``` -------------------------------- ### Get Selector TagResolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html Obtains a TagResolver for the 'selector' tag, also responding to 'sel'. This is likely used for selecting specific elements or components within a larger text structure. ```Java @NotNull public static @NotNull TagResolver selector() Get a resolver for the "selector" tag. This tag also responds to "sel". Returns: a resolver for the "selector" tag Since: 4.11.0 ``` -------------------------------- ### MiniMessage Builder API Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/package-summary.html This section details the MiniMessage.Builder class, which is used to create and configure instances of the MiniMessage parser. ```APIDOC ## MiniMessage.Builder ### Description A builder for `MiniMessage`. Allows for customization of the MiniMessage parser. ### Method N/A (Class/Builder pattern) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java MiniMessage miniMessage = MiniMessage.builder().build(); ``` ### Response #### Success Response (200) N/A (This is a builder class) #### Response Example N/A ``` -------------------------------- ### Create Named String Argument Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/translation/Argument.html Creates a named string argument with the specified name and value. ```APIDOC ## POST /api/componentlike/string ### Description Creates a named string argument. ### Method POST ### Endpoint /api/componentlike/string ### Parameters #### Query Parameters - **name** (string) - Required - The name of the argument. - **value** (string) - Required - The string value of the argument. ### Request Example ```json { "name": "message", "value": "Hello, world!" } ``` ### Response #### Success Response (200) - **componentLike** (object) - The created ComponentLike object. #### Response Example ```json { "componentLike": { "type": "string", "name": "message", "value": "Hello, world!" } } ``` ``` -------------------------------- ### Standard Tags Resolvers Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/standard/StandardTags.html This section provides methods to get TagResolvers for various standard MiniMessage tags. These resolvers can be used to enable specific formatting and functionality within MiniMessage text. ```APIDOC ## Standard Tags API ### Description Provides methods to obtain `TagResolver` instances for various standard MiniMessage tags. These resolvers are essential for parsing and applying text formatting and functionality. ### Method Summary - `clickEvent()`: Get a resolver for the "click" tag. - `color()`: Get a resolver for the "color" tags. - `decorations()`: Get a resolver for all decoration tags. - `decorations(@NotNull TextDecoration decoration)`: Get a resolver for a specific text decoration. - `defaults()`: Get a resolver that handles all default standard tags. - `font()`: Get a resolver for the "font" tag. - `gradient()`: Get a resolver for the "gradient" tag. - `hoverEvent()`: Get a resolver for the "hover" tag. - `insertion()`: Get a resolver for the "insert" tag. - `keybind()`: Get a resolver for the "key" tag. - `nbt()`: Get a resolver for the "nbt" tag. - `newline()`: Get a resolver for the "newline" tag. - `pride()`: Get a resolver for the "pride" tag. - `rainbow()`: Get a resolver for the "rainbow" tag. - `reset()`: Get a resolver for the "reset" tag. - `score()`: Get a resolver for the "score" tag. - `selector()`: Get a resolver for the "selector" tag. - `sequentialHead()`: Get a resolver for the "head" tag. - `shadowColor()`: Get a resolver for the "shadow" tags. - `sprite()`: Get a resolver for the "sprite" tag. - `transition()`: Get a resolver for the "transition" tag. - `translatable()`: Get a resolver for the "translate" tag. - `translatableFallback()`: Get a resolver for the "translate_or" tag. ### Usage Example ```java import net.kyori.adventure.text.minimessage.MiniMessage; import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; // Assuming you have a MiniMessage instance MiniMessage miniMessage = MiniMessage.miniMessage(); // Create a resolver that includes all default standard tags TagResolver allStandardTags = StandardTags.defaults(); // Parse a message with standard tags String message = "Hello, World!"; System.out.println(miniMessage.deserialize(message, allStandardTags)); // Create a resolver for a specific tag, e.g., color TagResolver colorTag = StandardTags.color(); // Parse a message using only the color tag resolver String colorMessage = "This is blue."; System.out.println(miniMessage.deserialize(colorMessage, colorTag)); ``` ### Response All methods return a `TagResolver` instance. The success response is the `TagResolver` object itself, which can be directly used with `MiniMessage.deserialize()`. ``` -------------------------------- ### Create Empty TagResolver Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/resolver/TagResolver.html Returns an empty tag resolver that will always return null for any resolution attempt. Useful for creating a resolver with no tags. ```java TagResolver empty() { // Implementation omitted for brevity return null; } ``` -------------------------------- ### Get Base Tag Resolver (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/MiniMessage.html Retrieves the base tag resolver associated with this MiniMessage instance. This resolver is used for handling predefined tags. This method is available since version 4.15.0. ```Java @NotNull @NotNull TagResolver tags() ``` -------------------------------- ### MiniMessage Builder Debug Source: https://jd.advntr.dev/text-minimessage/4.26.1/index-all.html Allows enabling debug output for the MiniMessage builder. ```APIDOC ## MiniMessage Builder Debug ### Description This method allows you to configure the `MiniMessage.Builder` to output debug information to a specified consumer. Debugging is disabled by default. ### Method - **`debug(Consumer)`** - **Description**: Print debug information to the given output consumer. - **Endpoint**: N/A (Method Call) - **Parameters**: - `consumer` (Consumer) - Required - A consumer that accepts debug messages as strings. - **Request Body**: N/A - **Success Response**: `MiniMessage.Builder` (for chaining) ### Request Example ```java // Example for debug(Consumer) import java.util.function.Consumer; Consumer debugOutput = message -> System.out.println("[DEBUG] " + message); MiniMessage miniMessage = MiniMessage.builder() .debug(debugOutput) .build(); String message = "This is a test."; miniMessage.deserialize(message); // Debug messages will be printed to the console via the provided consumer. ``` ### Response Example ``` [DEBUG] Parsing: This is a test. [DEBUG] Found tag: bold [DEBUG] Parsed tag: bold ``` ``` -------------------------------- ### Get Original Input Message - Java Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tree/Node.Root.html Retrieves the original message string that was parsed to create this node. This method is part of the Node.Root interface and is available since version 4.10.0. ```java @NotNull @NotNull String input() Get the original provided message which produced this node. Returns: the input message Since: 4.10.0 ``` -------------------------------- ### Create Styling Tag with Style Builder Actions - Java Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/Tag.html Creates a tag that applies multiple style builder actions to components. This method is used for applying predefined or custom styles to content formatted with MiniMessage. ```java public static @NotNull Tag styling(@NotNull StyleBuilderApplicable @NotNull ... actions) ``` -------------------------------- ### Resolve Tag with Arguments and Context (Java) Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/resolver/TagResolver.WithoutArguments.html Gets a tag from the resolver based on the current state, including the tag name, its arguments, and the parsing context. This method is provided as a default implementation in the TagResolver interface and is available to TagResolver.WithoutArguments. It can throw a ParsingException if the provided arguments are invalid. ```java @Nullable default @Nullable Tag resolve(@NotNull String name, @NotNull ArgumentQueue arguments, @NotNull Context ctx) throws ParsingException ``` -------------------------------- ### Create Target Argument Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/translation/Argument.html Creates an argument to set the target of the deserialization process. ```APIDOC ## POST /api/componentlike/target ### Description Creates an argument used to set the target of the deserialization process. ### Method POST ### Endpoint /api/componentlike/target ### Parameters #### Query Parameters - **target** (object) - Required - The Pointered target object. ### Request Example ```json { "target": { "type": "pointered", "path": "message.content" } } ``` ### Response #### Success Response (200) - **componentLike** (object) - The created ComponentLike object. #### Response Example ```json { "componentLike": { "type": "target", "target": { "type": "pointered", "path": "message.content" } } } ``` ``` -------------------------------- ### Context and Node Methods Source: https://jd.advntr.dev/text-minimessage/4.26.1/index-all.html Methods related to the parsing context and the structure of parsed nodes. ```APIDOC ## Context and Node Operations ### emitVirtuals() **Description**: Dictates if transformations may emit virtual components or not. **Method**: N/A (Method within an interface) **Endpoint**: N/A ### input() **Description**: Get the original provided message which produced this node. **Method**: N/A (Method within an interface) **Endpoint**: N/A ``` -------------------------------- ### Create Styling Tag with Style Builder Consumer - Java Source: https://jd.advntr.dev/text-minimessage/4.26.1/net/kyori/adventure/text/minimessage/tag/Tag.html Creates a tag that applies specified styles to components using a Style.Builder consumer. This method allows for dynamic style application within MiniMessage tags. ```java public static @NotNull Tag styling(Consumer styles) ``` -------------------------------- ### net.kyori.adventure.text.minimessage.ParsingException Source: https://jd.advntr.dev/text-minimessage/4.26.1/constant-values.html Details about the ParsingException class used in Minimessage parsing. ```APIDOC ## net.kyori.adventure.text.minimessage.ParsingException ### Description Represents an exception that occurs during the parsing of Minimessage strings. ### Method N/A (Class Documentation) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (N/A) N/A #### Response Example N/A ### Constants #### `LOCATION_UNKNOWN` - **Type**: `int` - **Value**: `-1` - **Description**: Represents an unknown location during parsing. ```