Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/team: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Fix template calls: add MC/ prefix
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{MC/Exclusive|java}}
{{exclusive|java}}
{{Infobox command
{{Infobox command
|name=team
|name=team
Line 26: Line 26:
==Arguments==
==Arguments==


{{MC/Argument|team|team}} (in <code>list</code>, <code>remove</code>, <code>empty</code>, <code>join</code>, and <code>modify</code> mode)
{{argument|team|team}} (in <code>list</code>, <code>remove</code>, <code>empty</code>, <code>join</code>, and <code>modify</code> mode)
: Specifies the name of a team.
: Specifies the name of a team.
: {{MC/Arg desc|je=team}}
: {{arg desc|je=team}}


{{MC/Argument|team|string}} (in <code>add</code> mode)
{{argument|team|string}} (in <code>add</code> mode)
: Specifies the name for a new team.
: Specifies the name for a new team.
: {{MC/Arg desc|je=string|type=word}}
: {{arg desc|je=string|type=word}}


{{MC/Argument|displayName|component}}
{{argument|displayName|component}}
: Specifies the team name to be displayed.
: Specifies the team name to be displayed.
: {{MC/Arg desc|je=component}}
: {{arg desc|je=component}}


{{MC/Argument|members|score_holder}}
{{argument|members|score_holder}}
: Specifies the entities to join or leave the team.  
: Specifies the entities to join or leave the team.  
: {{MC/Arg desc|je=score_holder|amount=multiple}}
: {{arg desc|je=score_holder|amount=multiple}}


<code><''option''></code>
<code><''option''></code>
Line 46: Line 46:
:: Must be one of the following:
:: Must be one of the following:
::*<code>displayName</code>: Sets the display name of the team.
::*<code>displayName</code>: Sets the display name of the team.
::*<code>color</code>: Decides the color of the team and players in chat, above their head, on the Tab menu, and on the sidebar. Also changes the color of the outline of the entities caused by the Glowing effect.
::*<code>color</code>: Decides the color of the team and players in chat, above their head, on the Tab menu, and on the sidebar. Also changes the color of the outline of the entities caused by the [[Minecraft:Glowing]] effect.
::*<code>friendlyFire</code>: Enables/Disables players inflicting damage to each other when on the same team. (Note: players can still inflict status effects on each other.) Does not affect some non-player entities in a team.
::*<code>friendlyFire</code>: Enables/Disables players inflicting damage to each other when on the same team. (Note: players can still inflict status effects on each other.) Does not affect some non-player entities in a team.
::*<code>seeFriendlyInvisibles</code>: Decides whether invisible players are semi-transparent or completely invisible to other players on their team.
::*<code>seeFriendlyInvisibles</code>: Decides whether invisible players are semi-transparent or completely invisible to other players on their team.
Line 59: Line 59:
: Shown below are valid values for each option.
: Shown below are valid values for each option.
:*For <code>displayName</code>:
:*For <code>displayName</code>:
:**{{MC/Argument|displayName|component}} - Specifies the team name to be displayed. {{MC/Arg desc|je=component}}
:**{{argument|displayName|component}} - Specifies the team name to be displayed. {{arg desc|je=component}}
:*For <code>color</code>:
:*For <code>color</code>:
:** {{MC/Argument|value|color}} - {{MC/Arg desc|je=component}}
:** {{argument|value|team_color}} - {{arg desc|je=team_color}} It can also be the literal <code>reset</code>.
:*** Defaults to <code>reset</code>. If <code>reset</code>, names are shown in default color and formatting.
:*** Defaults to <code>reset</code>. If <code>reset</code>, names are shown in default color and formatting.
:*For <code>friendlyFire</code>:
:*For <code>friendlyFire</code>:
:** {{MC/Argument|allowed|boolean}} - {{MC/Arg desc|je=component}}
:** {{argument|allowed|boolean}} - {{arg desc|je=component}}
:***<code>true</code> - (Default) Enable players inflicting damage on each other when in the same team.
:***<code>true</code> - (Default) Enable players inflicting damage on each other when in the same team.
:***<code>false</code> - Disable players inflicting damage on each other when in the same team.
:***<code>false</code> - Disable players inflicting damage on each other when in the same team.
:*For <code>seeFriendlyInvisibles</code>:
:*For <code>seeFriendlyInvisibles</code>:
:** {{MC/Argument|allowed|boolean}} - {{MC/Arg desc|je=component}}
:** {{argument|allowed|boolean}} - {{arg desc|je=component}}
:***<code>true</code> - (Default) Can see invisible players on the same team semi-transparently.
:***<code>true</code> - (Default) Can see invisible players on the same team semi-transparently.
:***<code>false</code> - Cannot see invisible players on the same team.
:***<code>false</code> - Cannot see invisible players on the same team.
Line 84: Line 84:
:**<code>always</code> - (Default) Normal collision.
:**<code>always</code> - (Default) Normal collision.
:**<code>never</code> - No entities can push the entities in this team.
:**<code>never</code> - No entities can push the entities in this team.
:**<code>pushOtherTeams</code> - Entities in this team can be pushed only by other entities in the same team. (Contrary to the literal meaning.<ref name="bug">MC-87984</ref>)
:**<code>pushOtherTeams</code> - Entities in this team can be pushed only by other entities in the same team. (Contrary to the literal meaning.<ref name="bug">[[Minecraft:bugtracker:MC-87984|MC-87984]]</ref>)
:**<code>pushOwnTeam</code> - Entities in this team cannot be pushed by another entity in this team. (Contrary to the literal meaning.<ref name="bug"></ref>)
:**<code>pushOwnTeam</code> - Entities in this team cannot be pushed by another entity in this team. (Contrary to the literal meaning.<ref name="bug"></ref>)
:*For <code>prefix</code>:
:*For <code>prefix</code>:
:**{{MC/Argument|prefix|component}} - Specifies the prefix to display. {{MC/Arg desc|je=component}}
:**{{argument|prefix|component}} - Specifies the prefix to display. {{arg desc|je=component}}
:*For <code>suffix</code>:
:*For <code>suffix</code>:
:**{{MC/Argument|suffix|component}} - Specifies the suffix to display. {{MC/Arg desc|je=component}}
:**{{argument|suffix|component}} - Specifies the suffix to display. {{arg desc|je=component}}


== Result ==
== Result ==
Line 107: Line 107:
== Output ==
== Output ==


{{MC/Output table}}
{{Output table}}
{{MC/Output table|edition=je|On fail|0|0|0}}
{{Output table|edition=je|On fail|0|0|0}}
{{MC/Output table|cmd=/team list|On success|1|1|the number of existing teams}}
{{Output table|cmd=/team list|On success|1|1|the number of existing teams}}
{{MC/Output table|cmd=/team list <team>|On success|1|1|the number of members in the <code><team></code>}}
{{Output table|cmd=/team list <team>|On success|1|1|the number of members in the <code><team></code>}}
{{MC/Output table|cmd=/team add ...<br>/team remove ...|On success|1|1|the number of existing teams after execution}}
{{Output table|cmd=/team add ...<br>/team remove ...|On success|1|1|the number of existing teams after execution}}
{{MC/Output table|cmd=/team empty ...|On success|1|1|the number of members in the team before execution}}
{{Output table|cmd=/team empty ...|On success|1|1|the number of members in the team before execution}}
{{MC/Output table|cmd=/team join|On success|1|1|1}}
{{Output table|cmd=/team join|On success|1|1|1}}
{{MC/Output table|cmd=/team join <members>|On success|1|1|the number of specified entities}}
{{Output table|cmd=/team join <members>|On success|1|1|the number of specified entities}}
{{MC/Output table|cmd=/team leave ...|On success|1|1|the number of specified entities}}
{{Output table|cmd=/team leave ...|On success|1|1|the number of specified entities}}
{{MC/Output table|cmd=/team modify displayName ...<br>/team modify color ...<br>/team modify friendlyFire ...<br>/team modify seeFriendlyInvisibles ...<br>/team modify nametagVisibility ...<br>/team modify deathMessageVisibility ...<br>/team modify collisionRule ...|On success|1|1|0}}
{{Output table|cmd=/team modify displayName ...<br>/team modify color ...<br>/team modify friendlyFire ...<br>/team modify seeFriendlyInvisibles ...<br>/team modify nametagVisibility ...<br>/team modify deathMessageVisibility ...<br>/team modify collisionRule ...|On success|1|1|0}}
{{MC/Output table|cmd=/team modify prefix ...<br>/team modify suffix ...|On success|1|1|1}}
{{Output table|cmd=/team modify prefix ...<br>/team modify suffix ...|On success|1|1|1}}
{{MC/Output table}}
{{Output table}}


== History ==
== History ==


{{HistoryTable
{{HistoryTable
|{{MC/HistoryLine|java}}
|{{HistoryLine|java}}
|{{HistoryLine||1.13|dev=17w45a|Added {{MC/Cmd|team|link=none}}.}}
|{{HistoryLine||1.13|dev=17w45a|Added {{cmd|team|link=none}}.}}
|{{HistoryLine|||dev=18w20a|Added {{MC/Cmd|team option <team> prefix <prefix>|link=none}}.
|{{HistoryLine|||dev=18w20a|Added {{cmd|team option <team> prefix <prefix>|link=none}}.
|Added {{MC/Cmd|team option <team> suffix <suffix>|link=none}}.}}
|Added {{cmd|team option <team> suffix <suffix>|link=none}}.}}
|{{HistoryLine|||dev=pre8|{{MC/Cmd|team option|link=none}} is now {{MC/Cmd|team modify|link=none}}
|{{HistoryLine|||dev=pre8|{{cmd|team option|link=none}} is now {{cmd|team modify|link=none}}
|Added {{MC/Cmd|team modify <teamName> displayName|link=none}}.
|Added {{cmd|team modify <teamName> displayName|link=none}}.
|Team names are now text components, not raw strings.}}
|Team names are now text components, not raw strings.}}
|{{MC/HistoryLine||1.18|dev=21w37a|Removed 16 characters limit for the name of a team, and 40 characters limit for the name of members.}}
|{{HistoryLine||1.18|dev=21w37a|Removed 16 characters limit for the name of a team, and 40 characters limit for the name of members.}}
|{{HistoryLine||1.21.5|dev=25w05a|Text component arguments are now resolved before use in context of entity held in {{MC/Cd|@s}}.}}
|{{HistoryLine||1.21.5|dev=25w05a|Text component arguments are now resolved before use in context of entity held in {{cd|@s}}.}}
|{{HistoryLine||26.2|dev=snap5|The value argument in {{cmd|team modify <team> color <value>|link=none}} now uses the [[Minecraft:Argument types#team_color|<code>minecraft:team_color</code>]] argument, also allowing literal <code>reset</code>.}}
|{{HistoryLine|upcoming java}}
|{{HistoryLine||26.3|dev=snapshot1|The result of {{cmd|team join}} and {{cmd|team leave}} subcommands now reflects the exact count of entities that have joined or left (i.e. excluding entities for which teams have not changed).}}
}}
}}


== See also ==
== See also ==
*{{MC/Cmd|scoreboard}} – manages scoreboard objectives, players and displays
*{{cmd|scoreboard}} – manages scoreboard objectives, players and displays
*{{MC/Cmd|tag}} – tags players with a certain string
*{{cmd|tag}} – tags players with a certain string


==References==
==References==
{{MC/Reflist}}
{{Reflist}}


== Navigation ==
== Navigation ==
{{MC/Navbox commands}}
{{Navbox commands}}


de:Befehl/team
[[Minecraft:de:Befehl/team]]
ja:コマンド/team
[[Minecraft:ja:コマンド/team]]
pt:Comandos/team
[[Minecraft:pt:Comandos/team]]
ru:Команды консоли/team
[[Minecraft:ru:Команды консоли/team]]
zh:命令/team
[[Minecraft:zh:命令/team]]

Latest revision as of 11:10, 25 June 2026

Template:Exclusive Template:Infobox command

Controls teams.

Syntax

team list [<team>]
Lists all teams, with their display names and the amount of entities in them. The optional <team> can be used to specify a particular team.
team add <team> [<displayName>]
Creates a team with the given name and optional display name. <displayName> defaults to <team> when unspecified.
team remove <team>
Deletes the specified team.
team empty <team>
Removes all members from the named team.
team join <team> [<members>]
Assigns the specified entities to the specified team. If no entities are specified, makes the command executor join the team.
team leave <members>
Makes the specified entities leave their teams.
team modify <team> <option> <value>
Modifies the options of the specified team.

Arguments

Template:Argument (in list, remove, empty, join, and modify mode)

Specifies the name of a team.
Template:Arg desc

Template:Argument (in add mode)

Specifies the name for a new team.
Template:Arg desc

Template:Argument

Specifies the team name to be displayed.
Template:Arg desc

Template:Argument

Specifies the entities to join or leave the team.
Template:Arg desc

<option>

A specific option to change.
Must be one of the following:
  • displayName: Sets the display name of the team.
  • color: Decides the color of the team and players in chat, above their head, on the Tab menu, and on the sidebar. Also changes the color of the outline of the entities caused by the Minecraft:Glowing effect.
  • friendlyFire: Enables/Disables players inflicting damage to each other when on the same team. (Note: players can still inflict status effects on each other.) Does not affect some non-player entities in a team.
  • seeFriendlyInvisibles: Decides whether invisible players are semi-transparent or completely invisible to other players on their team.
  • nametagVisibility: Decides whose name tags above their heads can be seen.
  • deathMessageVisibility: Controls the visibility of death messages for players.
  • collisionRule: Controls the way entities on the team collide with other entities.
  • prefix: Modifies the prefix that displays at the beginning of players' names.
  • suffix: Modifies the suffix that displays at the end of players' names.

<value>

Specifies the value to set <option> to.
Shown below are valid values for each option.
  • For displayName:
  • For color:
  • For friendlyFire:
    • Template:Argument - Template:Arg desc
      • true - (Default) Enable players inflicting damage on each other when in the same team.
      • false - Disable players inflicting damage on each other when in the same team.
  • For seeFriendlyInvisibles:
    • Template:Argument - Template:Arg desc
      • true - (Default) Can see invisible players on the same team semi-transparently.
      • false - Cannot see invisible players on the same team.
  • For nametagVisibility:
    • never - Name above player's head cannot be seen by any players.
    • hideForOtherTeams - Name above player's head can be seen only by players in the same team.
    • hideForOwnTeam - Name above player's head cannot be seen by all the players in the same team.
    • always - (Default) Name above player's head can be seen by all the players.
  • For deathMessageVisibility:
    • never - Hide death message for all the players.
    • hideForOtherTeams - Hide death message to all the players who are not in the same team.
    • hideForOwnTeam - Hide death message to players in the same team.
    • always - (Default) Make death message visible to all the players.
  • For collisionRule:
    • always - (Default) Normal collision.
    • never - No entities can push the entities in this team.
    • pushOtherTeams - Entities in this team can be pushed only by other entities in the same team. (Contrary to the literal meaning.<ref name="bug">MC-87984</ref>)
    • pushOwnTeam - Entities in this team cannot be pushed by another entity in this team. (Contrary to the literal meaning.<ref name="bug"></ref>)
  • For prefix:
  • For suffix:

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table

History

Template:HistoryTable

See also

  • Template:Cmd – manages scoreboard objectives, players and displays
  • Template:Cmd – tags players with a certain string

References

Template:Reflist

Navigation

Template:Navbox commands

Minecraft:de:Befehl/team Minecraft:ja:コマンド/team Minecraft:pt:Comandos/team Minecraft:ru:Команды консоли/team Minecraft:zh:命令/team