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 pPlayerTeam, Component pPlayerName) getColor()
getFormattedName
(Component pFormattedName) getName()
boolean
int
void
setAllowFriendlyFire
(boolean pFriendlyFire) 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 pColor) Sets the color for this team.void
setDeathMessageVisibility
(Team.Visibility pVisibility) Sets the visibility flags for player death messages.void
setDisplayName
(Component pName) Sets the display name for this team.void
setNameTagVisibility
(Team.Visibility pVisibility) Sets the visibility flags for player name tags.void
setPlayerPrefix
(Component pPlayerPrefix) void
setPlayerSuffix
(Component pPlayerSuffix) void
setSeeFriendlyInvisibles
(boolean pFriendlyInvisibles) Sets whether members of this team can see other members that are invisible.void
unpackOptions
(int pFlags) 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 pFriendlyFire) 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 pFriendlyInvisibles) 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 pFlags) 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
-