Package org.spongepowered.api.scoreboard
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 Summary
Modifier and TypeMethodDescriptionallowFriendlyFire
(boolean enabled) Sets whether friendly fire is enabled for theTeam
.build()
Builds an instance of aTeam
.canSeeFriendlyInvisibles
(boolean enabled) Sets whether invisible team members are shown for theTeam
.default Team.Builder
collisionRule
(Supplier<? extends CollisionRule> rule) Sets theCollisionRule
for this team's members.collisionRule
(CollisionRule rule) Sets theCollisionRule
for this team's members.color
(NamedTextColor color) Sets the color of theTeam
.default Team.Builder
deathTextVisibility
(Supplier<? extends Visibility> visibility) Sets theVisibility
which controls who death Texts of players on theTeam
are visible to.deathTextVisibility
(Visibility visibility) Sets theVisibility
which controls who death Texts of players on theTeam
are visible to.displayName
(Component displayName) Sets the name displayed to users for theTeam
.Sets the name of theTeam
.default Team.Builder
nameTagVisibility
(Supplier<? extends Visibility> visibility) Sets theVisibility
which controls to who nametags of players on theTeam
are visible to.nameTagVisibility
(Visibility visibility) Sets theVisibility
which controls to who nametags of players on theTeam
are visible to.Sets the prefix prepended to the display name of users on theTeam
.Sets the suffix appended to the display name of users on theTeam
.Methods inherited from interface org.spongepowered.api.util.CopyableBuilder
from
-
Method Details
-
name
Sets the name of theTeam
.- Parameters:
name
- The name to set- Returns:
- This builder
-
color
Sets the color of theTeam
.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
Sets the name displayed to users for theTeam
.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
- TheComponent
to set- Returns:
- This builder
- Throws:
IllegalArgumentException
-
prefix
Sets the prefix prepended to the display name of users on theTeam
.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 theTeam
- Returns:
- This builder
-
suffix
Sets the suffix appended to the display name of users on theTeam
.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 theTeam
.- Returns:
- This builder
-
allowFriendlyFire
Sets whether friendly fire is enabled for theTeam
.- Parameters:
enabled
- Whether friendly fire is enabled- Returns:
- This builder
-
canSeeFriendlyInvisibles
Sets whether invisible team members are shown for theTeam
.- Parameters:
enabled
- Whether to show invisible teammates- Returns:
- This builder
-
nameTagVisibility
Sets theVisibility
which controls to who nametags of players on theTeam
are visible to.- Parameters:
visibility
- TheVisibility
for theTeam
's nametags- Returns:
- This builder
-
nameTagVisibility
Sets theVisibility
which controls to who nametags of players on theTeam
are visible to.- Parameters:
visibility
- TheVisibility
for theTeam
's nametags- Returns:
- This builder
-
deathTextVisibility
Sets theVisibility
which controls who death Texts of players on theTeam
are visible to.- Parameters:
visibility
- TheVisibility
for theTeam
's death Texts- Returns:
- This builder
-
deathTextVisibility
Sets theVisibility
which controls who death Texts of players on theTeam
are visible to.- Parameters:
visibility
- TheVisibility
for theTeam
's death Texts- Returns:
- This builder
-
collisionRule
Sets theCollisionRule
for this team's members.- Parameters:
rule
- TheCollisionRule
for theTeam
's members- Returns:
- This builder
-
collisionRule
Sets theCollisionRule
for this team's members.- Parameters:
rule
- TheCollisionRule
for theTeam
's members- Returns:
- This builder
-
members
-
build
Builds an instance of aTeam
.- Specified by:
build
in interfaceAbstractBuilder<Team>
- Returns:
- A new instance of a
Team
- Throws:
IllegalStateException
- if theTeam
is not complete
-