Interface MiniMessage.Builder

    • Method Detail

      • editTags

        @NotNull
        @NotNull MiniMessage.Builder editTags​(@NotNull
                                              @NotNull java.util.function.Consumer<TagResolver.Builder> adder)
        Add to the set of known tags this MiniMessage instance can use.
        Parameters:
        adder - a function operating on a builder containing currently known tags
        Returns:
        this builder
        Since:
        4.10.0
      • strict

        @NotNull
        @NotNull MiniMessage.Builder strict​(boolean strict)
        Enables strict mode (disabled by default).

        By default, MiniMessage will allow child-allowing tags to be implicitly closed. When strict mode is enabled, all child-allowing tags which are <opened> must be explicitly </closed> as well.

        Additionally, the reset tag is disabled in this mode. Any usage of this tag will throw a parser exception if strict mode is enabled.

        Parameters:
        strict - if strict mode should be enabled
        Returns:
        this builder
        Since:
        4.10.0
      • debug

        @NotNull
        @NotNull MiniMessage.Builder debug​(@Nullable
                                           @Nullable java.util.function.Consumer<java.lang.String> debugOutput)
        Print debug information to the given output (disabled by default).

        Debug output includes detailed information about the parsing process to help debug parser behavior.

        The consumer will receive line fragments terminated by LF, not complete lines. This avoids string concatenation within debug output generation. If the consumer is null, no debug information will be generated.

        Parameters:
        debugOutput - if debug mode should be enabled
        Returns:
        this builder
        Since:
        4.10.0
      • postProcessor

        @NotNull
        @NotNull MiniMessage.Builder postProcessor​(@NotNull
                                                   @NotNull java.util.function.UnaryOperator<Component> postProcessor)
        Specify a function that takes the component at the end of the parser process.

        By default, this compacts the resulting component with Component.compact().

        Parameters:
        postProcessor - method run at the end of parsing
        Returns:
        this builder
        Since:
        4.10.0
      • preProcessor

        @NotNull
        @NotNull MiniMessage.Builder preProcessor​(@NotNull
                                                  @NotNull java.util.function.UnaryOperator<java.lang.String> preProcessor)
        Specify a function that takes the string at the start of the parser process.

        By default, this does absolutely nothing.

        Parameters:
        preProcessor - method run at the start of parsing
        Returns:
        this builder
        Since:
        4.11.0