Interface Team.Builder

All Superinterfaces:
AbstractBuilder<Team>, Builder<Team,Team.Builder>, CopyableBuilder<Team,Team.Builder>, ResettableBuilder<Team,Team.Builder>
Enclosing interface:
Team

public static interface Team.Builder extends Builder<Team,Team.Builder>, CopyableBuilder<Team,Team.Builder>
Represents a builder tp create Team instances.
  • Method Details

    • name

      Team.Builder name(String name)
      Sets the name of the Team.
      Parameters:
      name - The name to set
      Returns:
      This builder
    • color

      Sets the color of the Team.

      The team's color is a distinct concept from its prefix or suffix. It is only used for colored sidebar display slots, and certain statistic criteria.

      Parameters:
      color - The color to set
      Returns:
      This builder
    • displayName

      Team.Builder displayName(Component displayName) throws IllegalArgumentException
      Sets the name displayed to users for the Team.

      Display names may be truncated in order to meet an implementation-defined length limit. In Vanilla, this is sixteen characters.

      By default, this is set to name(String)

      Parameters:
      displayName - The Component to set
      Returns:
      This builder
      Throws:
      IllegalArgumentException
    • prefix

      Team.Builder prefix(Component prefix)
      Sets the prefix prepended to the display name of users on the Team.

      Display names may be truncated in order to meet an implementation-defined length limit. In Vanilla, this is sixteen characters.

      Parameters:
      prefix - The new prefix for the Team
      Returns:
      This builder
    • suffix

      Team.Builder suffix(Component suffix)
      Sets the suffix appended to the display name of users on the Team.

      Display names may be truncated in order to meet an implementation-defined length limit. In Vanilla, this is sixteen characters.

      Parameters:
      suffix - The new suffix for the Team.
      Returns:
      This builder
    • allowFriendlyFire

      Team.Builder allowFriendlyFire(boolean enabled)
      Sets whether friendly fire is enabled for the Team.
      Parameters:
      enabled - Whether friendly fire is enabled
      Returns:
      This builder
    • canSeeFriendlyInvisibles

      Team.Builder canSeeFriendlyInvisibles(boolean enabled)
      Sets whether invisible team members are shown for the Team.
      Parameters:
      enabled - Whether to show invisible teammates
      Returns:
      This builder
    • nameTagVisibility

      default Team.Builder nameTagVisibility(Supplier<? extends Visibility> visibility)
      Sets the Visibility which controls to who nametags of players on the Team are visible to.
      Parameters:
      visibility - The Visibility for the Team's nametags
      Returns:
      This builder
    • nameTagVisibility

      Team.Builder nameTagVisibility(Visibility visibility)
      Sets the Visibility which controls to who nametags of players on the Team are visible to.
      Parameters:
      visibility - The Visibility for the Team's nametags
      Returns:
      This builder
    • deathTextVisibility

      default Team.Builder deathTextVisibility(Supplier<? extends Visibility> visibility)
      Sets the Visibility which controls who death Texts of players on the Team are visible to.
      Parameters:
      visibility - The Visibility for the Team's death Texts
      Returns:
      This builder
    • deathTextVisibility

      Team.Builder deathTextVisibility(Visibility visibility)
      Sets the Visibility which controls who death Texts of players on the Team are visible to.
      Parameters:
      visibility - The Visibility for the Team's death Texts
      Returns:
      This builder
    • collisionRule

      default Team.Builder collisionRule(Supplier<? extends CollisionRule> rule)
      Sets the CollisionRule for this team's members.
      Parameters:
      rule - The CollisionRule for the Team's members
      Returns:
      This builder
    • collisionRule

      Team.Builder collisionRule(CollisionRule rule)
      Sets the CollisionRule for this team's members.
      Parameters:
      rule - The CollisionRule for the Team's members
      Returns:
      This builder
    • members

      Team.Builder members(Set<Component> users)
      Sets the set of Component members on the Team.

      By default, this is the empty set.

      Parameters:
      users - The set of Component members on the Team
      Returns:
      This builder
    • build

      Team build() throws IllegalStateException
      Builds an instance of a Team.
      Specified by:
      build in interface AbstractBuilder<Team>
      Returns:
      A new instance of a Team
      Throws:
      IllegalStateException - if the Team is not complete