All Known Subinterfaces:
Inserting, Modifying, ParserDirective, PreProcess

public sealed interface Tag permits Inserting, Modifying, ParserDirective, PreProcess
A tag definition for the MiniMessage language.

All implementations of Tag must implement one of Inserting, Modifying, ParserDirective or PreProcess.

Since:
4.10.0
  • Method Details

    • preProcessParsed

      static PreProcess preProcessParsed(String content)
      Create a tag that inserts the content literally into the parse string.
      Parameters:
      content - content to insert
      Returns:
      a new tag
      Since:
      4.10.0
    • inserting

      static Tag inserting(Component content)
      Create a tag that will insert a certain component into the output.

      Any content between this tag and an explicit closing tag will become a child of content.

      Parameters:
      content - the content to insert.
      Returns:
      a tag that will insert this component
      Since:
      4.10.0
    • inserting

      static Tag inserting(ComponentLike value)
      Create a tag that will insert a certain component into the output.

      Any content between this tag and an explicit closing tag will become a child of content.

      Parameters:
      value - the content to insert, eagerly converted to a component
      Returns:
      a tag that will insert this component
      Since:
      4.10.0
    • selfClosingInserting

      static Tag selfClosingInserting(Component content)
      Create a tag that will insert a certain component into the output.

      This tag is self-closing, so its contents will not influence the style of following content.

      Parameters:
      content - the content to insert.
      Returns:
      a tag that will insert this component
      Since:
      4.10.0
    • selfClosingInserting

      static Tag selfClosingInserting(ComponentLike value)
      Create a tag that will insert a certain component into the output.

      This tag is self-closing, so its contents will not influence the style of following content.

      Parameters:
      value - the content to insert, eagerly converted to a component
      Returns:
      a tag that will insert this component
      Since:
      4.10.0
    • styling

      static Tag styling(Consumer<Style.Builder> styles)
      Create a tag that will apply a certain style to components.
      Parameters:
      styles - the action applied to the component style
      Returns:
      a tag for this action
      Since:
      4.10.0
    • styling

      static Tag styling(@Nullable StyleBuilderApplicable... actions)
      Create a tag that will apply certain styles to components.
      Parameters:
      actions - the style builder actions
      Returns:
      a tag for these actions
      Since:
      4.10.0