Interface Style.Builder

    • Method Detail

      • font

        @Contract("_ -> this")
        @NotNull
        @NotNull Style.Builder font​(@Nullable
                                    @Nullable Key font)
        Sets the font.
        Specified by:
        font in interface StyleSetter<Style.Builder>
        Parameters:
        font - the font
        Returns:
        this builder
        Since:
        4.0.0
        Since Minecraft:
        1.16
      • colorIfAbsent

        @Contract("_ -> this")
        @NotNull
        @NotNull Style.Builder colorIfAbsent​(@Nullable
                                             @Nullable TextColor color)
        Sets the color if there isn't one set already.
        Specified by:
        colorIfAbsent in interface StyleSetter<Style.Builder>
        Parameters:
        color - the color
        Returns:
        this builder
        Since:
        4.0.0
      • decoration

        @Contract("_, _ -> this")
        @NotNull
        default @NotNull Style.Builder decoration​(@NotNull
                                                  @NotNull TextDecoration decoration,
                                                  boolean flag)
        Sets the state of a decoration on this style.
        Specified by:
        decoration in interface StyleSetter<Style.Builder>
        Parameters:
        decoration - the decoration
        flag - true if this style should have the decoration, false if this style should not have the decoration
        Returns:
        a style
        Since:
        4.0.0
      • insertion

        @Contract("_ -> this")
        @NotNull
        @NotNull Style.Builder insertion​(@Nullable
                                         @Nullable String insertion)
        Sets the string to be inserted.
        Specified by:
        insertion in interface StyleSetter<Style.Builder>
        Parameters:
        insertion - the insertion string
        Returns:
        this builder
        Since:
        4.0.0
      • merge

        @Contract("_ -> this")
        @NotNull
        default @NotNull Style.Builder merge​(@NotNull
                                             @NotNull Style that)
        Merges from another style into this style.
        Parameters:
        that - the other style
        Returns:
        this builder
        Since:
        4.0.0
      • merge

        @Contract("_, _ -> this")
        @NotNull
        default @NotNull Style.Builder merge​(@NotNull
                                             @NotNull Style that,
                                             @NotNull Style.Merge.Strategy strategy)
        Merges from another style into this style.
        Parameters:
        that - the other style
        strategy - the merge strategy
        Returns:
        this builder
        Since:
        4.0.0
      • merge

        @Contract("_, _ -> this")
        @NotNull
        default @NotNull Style.Builder merge​(@NotNull
                                             @NotNull Style that,
                                             @NotNull
                                             @NotNull Style.Merge @NotNull ... merges)
        Merges from another style into this style.
        Parameters:
        that - the other style
        merges - the parts to merge
        Returns:
        this builder
        Since:
        4.0.0
      • merge

        @Contract("_, _, _ -> this")
        @NotNull
        default @NotNull Style.Builder merge​(@NotNull
                                             @NotNull Style that,
                                             @NotNull Style.Merge.Strategy strategy,
                                             @NotNull
                                             @NotNull Style.Merge @NotNull ... merges)
        Merges from another style into this style.
        Parameters:
        that - the other style
        strategy - the merge strategy
        merges - the parts to merge
        Returns:
        this builder
        Since:
        4.0.0
      • merge

        @Contract("_, _ -> this")
        @NotNull
        default @NotNull Style.Builder merge​(@NotNull
                                             @NotNull Style that,
                                             @NotNull
                                             @NotNull Set<Style.Merge> merges)
        Merges from another style into this style.
        Parameters:
        that - the other style
        merges - the parts to merge
        Returns:
        this builder
        Since:
        4.0.0
      • merge

        @Contract("_, _, _ -> this")
        @NotNull
        @NotNull Style.Builder merge​(@NotNull
                                     @NotNull Style that,
                                     @NotNull Style.Merge.Strategy strategy,
                                     @NotNull
                                     @NotNull Set<Style.Merge> merges)
        Merges from another style into this style.
        Parameters:
        that - the other style
        strategy - the merge strategy
        merges - the parts to merge
        Returns:
        this builder
        Since:
        4.0.0
      • apply

        @Contract("_ -> this")
        @NotNull
        default @NotNull Style.Builder apply​(@NotNull
                                             @NotNull StyleBuilderApplicable applicable)
        Applies applicable to this builder.
        Parameters:
        applicable - the applicable
        Returns:
        this builder
        Since:
        4.0.0