Interface ScoreComponent.Builder

All Superinterfaces:
AbstractBuilder<ScoreComponent>, ComponentBuilder<ScoreComponent,ScoreComponent.Builder>, ComponentBuilderApplicable, ComponentLike, MutableStyleSetter<ScoreComponent.Builder>, StyleSetter<ScoreComponent.Builder>
Enclosing interface:
ScoreComponent

public static sealed interface ScoreComponent.Builder extends ComponentBuilder<ScoreComponent,ScoreComponent.Builder>
A score component builder.
Since:
4.0.0
  • Method Details

    • name

      @Contract("_ -> this") ScoreComponent.Builder name(String name)
      Sets the score name.
      Parameters:
      name - the score name
      Returns:
      this builder
      Since:
      4.0.0
    • objective

      @Contract("_ -> this") ScoreComponent.Builder objective(String objective)
      Sets the score objective.
      Parameters:
      objective - the score objective
      Returns:
      this builder
      Since:
      4.0.0
    • value

      @Contract("_ -> this") @Obsolete ScoreComponent.Builder value(@Nullable String value)
      Sets the value.
      Parameters:
      value - the value
      Returns:
      this builder
      Since:
      4.0.0
      Obsolete since Minecraft
      1.16.5, no longer supported