Package net.minecraft.world.scores
Class PlayerTeam
java.lang.Object
net.minecraft.world.scores.Team
net.minecraft.world.scores.PlayerTeam
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.scores.Team
Team.CollisionRule, Team.Visibility
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private static final int
private static final int
private Team.CollisionRule
private ChatFormatting
private Team.Visibility
private Component
private final Style
private final String
private Team.Visibility
private Component
private Component
private final Scoreboard
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
static MutableComponent
formatNameForTeam
(Team playerTeam, Component playerName) getColor()
getFormattedName
(Component formattedName) getName()
boolean
int
void
setAllowFriendlyFire
(boolean friendlyFire) Sets whether friendly fire (PVP between members of the team) is allowed.void
Sets the rule to be used for handling collisions with members of this team.void
setColor
(ChatFormatting color) Sets the color for this team.void
setDeathMessageVisibility
(Team.Visibility visibility) Sets the visibility flags for player death messages.void
setDisplayName
(Component name) Sets the display name for this team.void
setNameTagVisibility
(Team.Visibility visibility) Sets the visibility flags for player name tags.void
setPlayerPrefix
(Component playerPrefix) void
setPlayerSuffix
(Component playerSuffix) void
setSeeFriendlyInvisibles
(boolean friendlyInvisibles) Sets whether members of this team can see other members that are invisible.void
unpackOptions
(int flags) Sets friendly fire and invisibles flags based off of the given bitmask.Methods inherited from class net.minecraft.world.scores.Team
isAlliedTo
-
Field Details
-
BIT_FRIENDLY_FIRE
private static final int BIT_FRIENDLY_FIRE- See Also:
-
BIT_SEE_INVISIBLES
private static final int BIT_SEE_INVISIBLES- See Also:
-
scoreboard
-
name
-
players
-
displayName
-
playerPrefix
-
playerSuffix
-
allowFriendlyFire
private boolean allowFriendlyFire -
seeFriendlyInvisibles
private boolean seeFriendlyInvisibles -
nameTagVisibility
-
deathMessageVisibility
-
color
-
collisionRule
-
displayNameStyle
-
-
Constructor Details
-
PlayerTeam
-
-
Method Details
-
getScoreboard
-
getName
-
getDisplayName
-
getFormattedDisplayName
-
setDisplayName
Sets the display name for this team. -
setPlayerPrefix
-
getPlayerPrefix
-
setPlayerSuffix
-
getPlayerSuffix
-
getPlayers
- Specified by:
getPlayers
in classTeam
-
getFormattedName
- Specified by:
getFormattedName
in classTeam
-
formatNameForTeam
-
isAllowFriendlyFire
public boolean isAllowFriendlyFire()- Specified by:
isAllowFriendlyFire
in classTeam
-
setAllowFriendlyFire
public void setAllowFriendlyFire(boolean friendlyFire) Sets whether friendly fire (PVP between members of the team) is allowed. -
canSeeFriendlyInvisibles
public boolean canSeeFriendlyInvisibles()- Specified by:
canSeeFriendlyInvisibles
in classTeam
-
setSeeFriendlyInvisibles
public void setSeeFriendlyInvisibles(boolean friendlyInvisibles) Sets whether members of this team can see other members that are invisible. -
getNameTagVisibility
- Specified by:
getNameTagVisibility
in classTeam
-
getDeathMessageVisibility
- Specified by:
getDeathMessageVisibility
in classTeam
-
setNameTagVisibility
Sets the visibility flags for player name tags. -
setDeathMessageVisibility
Sets the visibility flags for player death messages. -
getCollisionRule
- Specified by:
getCollisionRule
in classTeam
-
setCollisionRule
Sets the rule to be used for handling collisions with members of this team. -
packOptions
public int packOptions() -
unpackOptions
public void unpackOptions(int flags) Sets friendly fire and invisibles flags based off of the given bitmask. -
setColor
Sets the color for this team. The team color is used mainly for team kill objectives and team-specific setDisplay usage. It does _not_ affect all situations (for instance, the prefix is used for the glowing effect). -
getColor
-