Interface MiniMessageWrapper.Builder

    • Method Detail

      • gradients

        @NotNull
        @NotNull MiniMessageWrapper.Builder gradients​(boolean parse)
        Whether gradients on the final string should be parsed.
        Parameters:
        parse - whether to parse
        Returns:
        this builder
      • hexColors

        @NotNull
        @NotNull MiniMessageWrapper.Builder hexColors​(boolean parse)
        Whether hex colors on the final string should be parsed.
        Parameters:
        parse - whether to parse
        Returns:
        this builder
      • standardColors

        @NotNull
        @NotNull MiniMessageWrapper.Builder standardColors​(boolean parse)
        Whether all standard color codes on the final string should be parsed.
        Parameters:
        parse - whether to parse
        Returns:
        this builder
      • legacyColors

        @NotNull
        @NotNull MiniMessageWrapper.Builder legacyColors​(boolean parse)
        Whether legacy color codes on the final string should be parsed.
        Parameters:
        parse - whether to parse
        Returns:
        this builder
      • advancedTransformations

        @NotNull
        @NotNull MiniMessageWrapper.Builder advancedTransformations​(boolean parse)
        Whether to parse advanced TransformationTypes on the final string to be parsed. This includes click events, hover events, fonts, etc.
        Parameters:
        parse - whether to parse
        Returns:
        this builder
      • removeTextDecorations

        @NotNull
        @NotNull MiniMessageWrapper.Builder removeTextDecorations​(@NotNull
                                                                  @NotNull net.kyori.adventure.text.format.TextDecoration... decorations)
        The TextDecorations that should not be parsed.
        Parameters:
        decorations - the decorations
        Returns:
        this builder
      • placeholderResolver

        @NotNull
        @NotNull MiniMessageWrapper.Builder placeholderResolver​(@NotNull
                                                                @NotNull net.kyori.adventure.text.minimessage.placeholder.PlaceholderResolver placeholderResolver)
        Set the PlaceholderResolver for the MiniMessage instance.
        Parameters:
        placeholderResolver - the placeholder resolver
        Returns:
        this builder
      • removeColors

        @NotNull
        @NotNull MiniMessageWrapper.Builder removeColors​(boolean blockCloseHex,
                                                         @NotNull
                                                         @NotNull net.kyori.adventure.text.format.NamedTextColor... colors)
        The NamedTextColors that should not be parsed.
        Parameters:
        blockCloseHex - whether to block hex codes that are close to blocked colors
        colors - the colors
        Returns:
        this builder
      • preventLuminanceBelow

        @NotNull
        @NotNull MiniMessageWrapper.Builder preventLuminanceBelow​(int threshold)

        Prevent hex colors that have a luminance below a certain threshold. Luminance is measure 0 - 255. There's a method in MiniMessageWrapperImpl that is used to calculate it. This is typically used to prevent very dark colors.

        Note: If you want to block the normal black color, remember to add it to removeColors(boolean, NamedTextColor...)

        Parameters:
        threshold - all colors with luminance below this will not be parsed
        Returns:
        this builder