Interface AbstractTeam
- All Known Implementing Classes:
BukkitTeamImpl, FoliaTeamImpl
public interface AbstractTeam
Represents a team that can be used to manage entries and their display properties. This is an abstraction over the
underlying
Team and ScoreboardTeam objects. Entries can be
either player display names (usernames) or entity UUIDs represented as strings.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumEnum representing collision rule options.static enumEnum representing name tag visibility options.static enumEnum representing send modes.static interfaceInterface for team options that can be represented as both a packet-based value and a Bukkit value. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an entry to the team.Gets the collision rule of the team.getColor()Gets the color of the team.Gets the underlying delegate object.getName()Gets the name of the team.Gets the name tag visibility of the team.intgetSize()Gets the number of entries in the team.booleanChecks if the team has an entry.voidremoveEntry(String entry) Removes an entry from the team.voidsendToPlayer(Player player, AbstractTeam.SendMode mode) Sends the team to a player.voidSets the collision rule of the team.voidSets the color of the team.voidsetNameTagVisibility(AbstractTeam.NameTags visibility) Sets the name tag visibility of the team.
-
Method Details
-
addEntry
Adds an entry to the team. For players, this should be their display name (username). For entities, this should be their UUID represented as a string.- Parameters:
entry- Entry to add.
-
getCollisionRule
AbstractTeam.CollisionRule getCollisionRule()Gets the collision rule of the team.- Returns:
- The collision rule of the team.
-
getColor
-
getDelegate
-
getName
-
getNameTagVisibility
AbstractTeam.NameTags getNameTagVisibility()Gets the name tag visibility of the team.- Returns:
- The name tag visibility of the team.
-
getSize
int getSize()Gets the number of entries in the team.- Returns:
- The number of entries in the team.
-
hasEntry
Checks if the team has an entry. For players, this should be their display name (username). For entities, this should be their UUID represented as a string.- Parameters:
entry- Entry to check.- Returns:
- True if the team has the entry, false otherwise.
-
removeEntry
Removes an entry from the team. For players, this should be their display name (username). For entities, this should be their UUID represented as a string.- Parameters:
entry- Entry to remove.
-
sendToPlayer
Sends the team to a player.- Parameters:
player- Player to send to.mode- Send mode.
-
setCollisionRule
Sets the collision rule of the team.- Parameters:
rule- The collision rule of the team.
-
setColor
Sets the color of the team.- Parameters:
color- The color of the team.
-
setNameTagVisibility
Sets the name tag visibility of the team.- Parameters:
visibility- The name tag visibility of the team.
-