Interface MinecraftRenderer

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      @Nullable net.kyori.adventure.text.Component appendChannelMention​(@NonNull net.kyori.adventure.text.Component component, @NonNull java.lang.String id)
      Renders a channel mention and appends it to the provided Component.
      @Nullable net.kyori.adventure.text.Component appendEmoteMention​(@NonNull net.kyori.adventure.text.Component component, @NonNull java.lang.String name, @NonNull java.lang.String id)
      Renders a emote mention and appends it to the provided Component.
      @Nullable net.kyori.adventure.text.Component appendQuote​(@NonNull net.kyori.adventure.text.Component component, @NonNull net.kyori.adventure.text.Component content)
      Adds the required formatting for quotes to the provided Component.
      @Nullable net.kyori.adventure.text.Component appendRoleMention​(@NonNull net.kyori.adventure.text.Component component, @NonNull java.lang.String id)
      Renders a role mention and appends it to the provided Component.
      @Nullable net.kyori.adventure.text.Component appendSpoiler​(@NonNull net.kyori.adventure.text.Component component, @NonNull net.kyori.adventure.text.Component content)
      Renders the spoiler and appends it to the provided Component.
      @Nullable net.kyori.adventure.text.Component appendUserMention​(@NonNull net.kyori.adventure.text.Component component, @NonNull java.lang.String id)
      Renders a user mention and appends it to the provided Component.
      @Nullable net.kyori.adventure.text.Component bold​(@NonNull net.kyori.adventure.text.Component part)
      Renders the provided Component as bold.
      @Nullable net.kyori.adventure.text.Component codeBlock​(@NonNull net.kyori.adventure.text.Component part)
      Renders the provided Component as a code block.
      @Nullable net.kyori.adventure.text.Component codeString​(@NonNull net.kyori.adventure.text.Component part)
      Renders the provided Component as a code string.
      @Nullable net.kyori.adventure.text.Component italics​(@NonNull net.kyori.adventure.text.Component part)
      Renders the provided Component as italics.
      default net.kyori.adventure.text.Component render​(net.kyori.adventure.text.Component component, dev.vankka.simpleast.core.node.Node<java.lang.Object> node, MinecraftSerializerOptions<net.kyori.adventure.text.Component> serializerOptions, java.util.function.Function<dev.vankka.simpleast.core.node.Node<java.lang.Object>,​net.kyori.adventure.text.Component> renderWithChildren)
      Renders the given Node onto the provided Component using the given MinecraftSerializerOptions.
      @Nullable net.kyori.adventure.text.Component strikethrough​(@NonNull net.kyori.adventure.text.Component part)
      Renders the provided Component as strikethrough.
      @Nullable net.kyori.adventure.text.Component underline​(@NonNull net.kyori.adventure.text.Component part)
      Renders the provided Component as underlined.
    • Method Detail

      • render

        default net.kyori.adventure.text.Component render​(net.kyori.adventure.text.Component component,
                                                          dev.vankka.simpleast.core.node.Node<java.lang.Object> node,
                                                          MinecraftSerializerOptions<net.kyori.adventure.text.Component> serializerOptions,
                                                          java.util.function.Function<dev.vankka.simpleast.core.node.Node<java.lang.Object>,​net.kyori.adventure.text.Component> renderWithChildren)
        Description copied from interface: MinecraftNodeRenderer
        Renders the given Node onto the provided Component using the given MinecraftSerializerOptions.
        Specified by:
        render in interface MinecraftNodeRenderer
        Specified by:
        render in interface NodeRenderer<net.kyori.adventure.text.Component>
        Parameters:
        component - the input component to apply the node to
        node - the node
        serializerOptions - the serializer options for this render
        renderWithChildren - a function to allow rendering a node recursively
        Returns:
        the new component with the node applied to it
      • strikethrough

        @Nullable net.kyori.adventure.text.Component strikethrough​(@NonNull
                                                                   @NonNull net.kyori.adventure.text.Component part)
        Renders the provided Component as strikethrough.
        Parameters:
        part - the Component to render as strikethrough
        Returns:
        the strikethrough Component or null if this renderer does not process that kinds of styles
      • underline

        @Nullable net.kyori.adventure.text.Component underline​(@NonNull
                                                               @NonNull net.kyori.adventure.text.Component part)
        Renders the provided Component as underlined.
        Parameters:
        part - the Component to render as underlined
        Returns:
        the underlined Component or null if this renderer does not process that kinds of styles
      • italics

        @Nullable net.kyori.adventure.text.Component italics​(@NonNull
                                                             @NonNull net.kyori.adventure.text.Component part)
        Renders the provided Component as italics.
        Parameters:
        part - the Component to render as italics
        Returns:
        the italics Component or null if this renderer does not process that kinds of styles
      • bold

        @Nullable net.kyori.adventure.text.Component bold​(@NonNull
                                                          @NonNull net.kyori.adventure.text.Component part)
        Renders the provided Component as bold.
        Parameters:
        part - the Component to render as bold
        Returns:
        the bold Component or null if this renderer does not process that kinds of styles
      • codeString

        @Nullable net.kyori.adventure.text.Component codeString​(@NonNull
                                                                @NonNull net.kyori.adventure.text.Component part)
        Renders the provided Component as a code string.
        Parameters:
        part - the Component to render the code string to
        Returns:
        the code stringed Component or null if this renderer does not process that kinds of styles
      • codeBlock

        @Nullable net.kyori.adventure.text.Component codeBlock​(@NonNull
                                                               @NonNull net.kyori.adventure.text.Component part)
        Renders the provided Component as a code block.
        Parameters:
        part - the Component to render as a code block
        Returns:
        the code blocked Component or null if this renderer does not process that kinds of styles
      • appendSpoiler

        @Nullable net.kyori.adventure.text.Component appendSpoiler​(@NonNull
                                                                   @NonNull net.kyori.adventure.text.Component component,
                                                                   @NonNull
                                                                   @NonNull net.kyori.adventure.text.Component content)
        Renders the spoiler and appends it to the provided Component.
        Parameters:
        component - the Component to render the spoiler to
        content - the content of the spoiler
        Returns:
        the spoiler'ed Component or null if this renderer does not process that kinds of styles
      • appendQuote

        @Nullable net.kyori.adventure.text.Component appendQuote​(@NonNull
                                                                 @NonNull net.kyori.adventure.text.Component component,
                                                                 @NonNull
                                                                 @NonNull net.kyori.adventure.text.Component content)
        Adds the required formatting for quotes to the provided Component.
        Parameters:
        component - the Component to render to
        content - the content of the quote
        Returns:
        the Component with the quote rendered or null if this renderer does not process that kinds of styles
      • appendEmoteMention

        @Nullable net.kyori.adventure.text.Component appendEmoteMention​(@NonNull
                                                                        @NonNull net.kyori.adventure.text.Component component,
                                                                        @NonNull
                                                                        @NonNull java.lang.String name,
                                                                        @NonNull
                                                                        @NonNull java.lang.String id)
        Renders a emote mention and appends it to the provided Component.
        Parameters:
        component - the Component to render to
        name - the name of the emote
        id - the id of the emote
        Returns:
        the Component with emote rendered or null if this renderer does not process that kinds of styles
      • appendChannelMention

        @Nullable net.kyori.adventure.text.Component appendChannelMention​(@NonNull
                                                                          @NonNull net.kyori.adventure.text.Component component,
                                                                          @NonNull
                                                                          @NonNull java.lang.String id)
        Renders a channel mention and appends it to the provided Component.
        Parameters:
        component - the Component to render to
        id - the id of the channel
        Returns:
        the Component with the channel mention rendered or null if this renderer does not process that kinds of styles
      • appendUserMention

        @Nullable net.kyori.adventure.text.Component appendUserMention​(@NonNull
                                                                       @NonNull net.kyori.adventure.text.Component component,
                                                                       @NonNull
                                                                       @NonNull java.lang.String id)
        Renders a user mention and appends it to the provided Component.
        Parameters:
        component - the Component to render to
        id - the id of the user
        Returns:
        the Component with the user mention rendered or null if this renderer does not process that kinds of styles
      • appendRoleMention

        @Nullable net.kyori.adventure.text.Component appendRoleMention​(@NonNull
                                                                       @NonNull net.kyori.adventure.text.Component component,
                                                                       @NonNull
                                                                       @NonNull java.lang.String id)
        Renders a role mention and appends it to the provided Component.
        Parameters:
        component - the Component to render to
        id - the id of the role
        Returns:
        the Component with the role mention rendered or null if this renderer does not process that kinds of styles