Skip to main content

Documentation Index

Fetch the complete documentation index at: https://velas.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Teams group players and entities under shared visual properties. By assigning players or entities to a team, you can control how their names appear in chat, whether they can damage each other, how their name tags display to other players, and what collision rules apply between them. Teams are managed through your Scoreboard instance.

Creating and retrieving teams

Use scoreboard.team(String name) to create a team or retrieve an existing one by the same name. This is the primary way to work with teams — it is safe to call repeatedly with the same name.
Team redTeam = scoreboard.team("red");
If you only want to retrieve a team that already exists without creating one, use getTeam(String name). It returns null if no team with that name exists:
Team existing = scoreboard.getTeam("red"); // null if not found
To check whether a team exists before acting on it:
if (scoreboard.hasTeam("red")) {
    // team exists
}
To find which team a player belongs to:
Team playerTeam = scoreboard.getTeamOf(player); // null if not on a team

Team properties

Once you have a Team reference, you can configure its visual and gameplay properties. All setter methods return the Team instance, so you can chain them.
PropertyMethodDescription
ColorsetColor(TeamColor)Sets the team color used for name display. Choose from 16 TeamColor values.
PrefixsetPrefix(String)Text prepended to each member’s name in chat and above their head.
SuffixsetSuffix(String)Text appended to each member’s name in chat and above their head.
Friendly firesetFriendlyFire(boolean)Controls whether teammates can damage each other.
Friendly invisibilitiessetCanSeeFriendlyInvisibilities(boolean)Controls whether invisible teammates are visible to other team members.
Collision rulesetTeamCollisionRule(TeamCollisionRule)Sets entity collision behavior: NEVER, FOR_OWN_TEAM, FOR_OTHER_TEAMS, or ALWAYS.
Name tag visibilitysetNameTagVisibility(TeamNameTagVisibility)Controls who can see member name tags: NEVER, FOR_OWN_TEAM, FOR_OTHER_TEAMS, or ALWAYS.
TeamColor values: BLACK, DARK_BLUE, DARK_GREEN, DARK_AQUA, DARK_RED, DARK_PURPLE, GOLD, GRAY, DARK_GRAY, BLUE, GREEN, AQUA, RED, LIGHT_PURPLE, YELLOW, WHITE TeamCollisionRule values: NEVER, FOR_OWN_TEAM, FOR_OTHER_TEAMS, ALWAYS TeamNameTagVisibility values: NEVER, FOR_OWN_TEAM, FOR_OTHER_TEAMS, ALWAYS

Members

Add or remove players and entities from a team using the following methods:
MethodDescription
addPlayer(Player)Adds a player to the team.
addEntity(Entity)Adds a non-player entity to the team.
removePlayer(Player)Removes a player from the team.
removeEntity(Entity)Removes an entity from the team.
hasPlayer(Player)Returns true if the player is on this team.
hasEntity(Entity)Returns true if the entity is on this team.

Fluent API

All Team setter methods return the Team instance, so you can chain configuration into a single expression. This is the recommended way to set up a team.
Team redTeam = scoreboard.team("red")
    .setColor(TeamColor.RED)
    .setPrefix("§c[Red] ")
    .setFriendlyFire(false)
    .setTeamCollisionRule(TeamCollisionRule.FOR_OWN_TEAM)
    .setNameTagVisibility(TeamNameTagVisibility.ALWAYS)
    .addPlayer(player);
You can continue to call setter methods on the team later — for example, to update the prefix when a player’s rank changes:
scoreboard.getTeam("red").setPrefix("§c[Captain] ");
To remove a team entirely, call removeTeam(String name) on the scoreboard. To remove all teams at once, use clearTeams():
scoreboard.removeTeam("red");
scoreboard.clearTeams();