public interface TeamBuilder
Team
instances.Modifier and Type | Method and Description |
---|---|
TeamBuilder |
allowFriendlyFire(boolean enabled)
Sets whether friendly fire is enabled for the
Team . |
Team |
build()
Builds an instance of a
Team . |
TeamBuilder |
canSeeFriendlyInvisibles(boolean enabled)
Sets whether invisible team members are shown for the
Team . |
TeamBuilder |
color(TextColor color)
Sets the color of the
Team . |
TeamBuilder |
deathTextVisibility(Visibility visibility)
Sets the
Visibility which controls who death Texts
of players on the Team are visible to. |
TeamBuilder |
displayName(Text displayName)
Sets the name displayed to users for the
Team . |
TeamBuilder |
members(Set<Text> users)
|
TeamBuilder |
name(String name)
Sets the name of the
Team . |
TeamBuilder |
nameTagVisibility(Visibility visibility)
Sets the
Visibility which controls to who nametags
of players on the Team are visible to. |
TeamBuilder |
prefix(Text prefix)
Sets the prefix prepended to the display name of users on the
Team . |
TeamBuilder |
reset()
Resets all information regarding the
Team to be created. |
TeamBuilder |
suffix(Text suffix)
Sets the suffix appended to the display name of users on the
Team . |
TeamBuilder name(String name)
Team
.name
- The name to setTeamBuilder color(TextColor color) throws IllegalArgumentException
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.
color
- The color to setIllegalArgumentException
- If color is TextColors.RESET
TeamBuilder displayName(Text displayName) throws IllegalArgumentException
Team
.
Display names may be truncated in order to meet an implementation-defined length limit. In Vanilla, this is sixteen characters.
displayName
- The Text
to setIllegalArgumentException
- If the name is invalidTeamBuilder prefix(Text prefix)
Team
.
Display names may be truncated in order to meet an implementation-defined length limit. In Vanilla, this is sixteen characters.
prefix
- The new prefix for the Team
TeamBuilder suffix(Text suffix)
Team
.
Display names may be truncated in order to meet an implementation-defined length limit. In Vanilla, this is sixteen characters.
suffix
- The new suffix for the Team
.TeamBuilder allowFriendlyFire(boolean enabled)
Team
.enabled
- Whether friendly fire is enabledTeamBuilder canSeeFriendlyInvisibles(boolean enabled)
Team
.enabled
- Whether to show invisible teammatesTeamBuilder nameTagVisibility(Visibility visibility)
Visibility
which controls to who nametags
of players on the Team
are visible to.visibility
- The Visibility
for the Team
's nametagsTeamBuilder deathTextVisibility(Visibility visibility)
Visibility
which controls who death Texts
of players on the Team
are visible to.visibility
- The Visibility
for the Team
's death TextsTeamBuilder members(Set<Text> users)
TeamBuilder reset()
Team
to be created.Team build() throws IllegalStateException
Team
.Team
IllegalStateException
- if the Team
is not complete