Record Class PlayerTeam.Packed
java.lang.Object
java.lang.Record
net.minecraft.world.scores.PlayerTeam.Packed
- Enclosing class:
PlayerTeam
public static record PlayerTeam.Packed(String name, Optional<Component> displayName, Optional<ChatFormatting> color, boolean allowFriendlyFire, boolean seeFriendlyInvisibles, Component memberNamePrefix, Component memberNameSuffix, Team.Visibility nameTagVisibility, Team.Visibility deathMessageVisibility, Team.CollisionRule collisionRule, List<String> players)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theallowFriendlyFirerecord component.static final com.mojang.serialization.Codec<PlayerTeam.Packed> private final Team.CollisionRuleThe field for thecollisionRulerecord component.private final Optional<ChatFormatting> The field for thecolorrecord component.private final Team.VisibilityThe field for thedeathMessageVisibilityrecord component.The field for thedisplayNamerecord component.private final ComponentThe field for thememberNamePrefixrecord component.private final ComponentThe field for thememberNameSuffixrecord component.private final StringThe field for thenamerecord component.private final Team.VisibilityThe field for thenameTagVisibilityrecord component.The field for theplayersrecord component.private final booleanThe field for theseeFriendlyInvisiblesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPacked(String name, Optional<Component> displayName, Optional<ChatFormatting> color, boolean allowFriendlyFire, boolean seeFriendlyInvisibles, Component memberNamePrefix, Component memberNameSuffix, Team.Visibility nameTagVisibility, Team.Visibility deathMessageVisibility, Team.CollisionRule collisionRule, List<String> players) Creates an instance of aPackedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallowFriendlyFirerecord component.Returns the value of thecollisionRulerecord component.color()Returns the value of thecolorrecord component.Returns the value of thedeathMessageVisibilityrecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thememberNamePrefixrecord component.Returns the value of thememberNameSuffixrecord component.name()Returns the value of thenamerecord component.Returns the value of thenameTagVisibilityrecord component.players()Returns the value of theplayersrecord component.booleanReturns the value of theseeFriendlyInvisiblesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
name
The field for thenamerecord component. -
displayName
-
color
The field for thecolorrecord component. -
allowFriendlyFire
private final boolean allowFriendlyFireThe field for theallowFriendlyFirerecord component. -
seeFriendlyInvisibles
private final boolean seeFriendlyInvisiblesThe field for theseeFriendlyInvisiblesrecord component. -
memberNamePrefix
The field for thememberNamePrefixrecord component. -
memberNameSuffix
The field for thememberNameSuffixrecord component. -
nameTagVisibility
The field for thenameTagVisibilityrecord component. -
deathMessageVisibility
The field for thedeathMessageVisibilityrecord component. -
collisionRule
The field for thecollisionRulerecord component. -
players
-
CODEC
-
-
Constructor Details
-
Packed
public Packed(String name, Optional<Component> displayName, Optional<ChatFormatting> color, boolean allowFriendlyFire, boolean seeFriendlyInvisibles, Component memberNamePrefix, Component memberNameSuffix, Team.Visibility nameTagVisibility, Team.Visibility deathMessageVisibility, Team.CollisionRule collisionRule, List<String> players) Creates an instance of aPackedrecord class.- Parameters:
name- the value for thenamerecord componentdisplayName- the value for thedisplayNamerecord componentcolor- the value for thecolorrecord componentallowFriendlyFire- the value for theallowFriendlyFirerecord componentseeFriendlyInvisibles- the value for theseeFriendlyInvisiblesrecord componentmemberNamePrefix- the value for thememberNamePrefixrecord componentmemberNameSuffix- the value for thememberNameSuffixrecord componentnameTagVisibility- the value for thenameTagVisibilityrecord componentdeathMessageVisibility- the value for thedeathMessageVisibilityrecord componentcollisionRule- the value for thecollisionRulerecord componentplayers- the value for theplayersrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
displayName
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
allowFriendlyFire
public boolean allowFriendlyFire()Returns the value of theallowFriendlyFirerecord component.- Returns:
- the value of the
allowFriendlyFirerecord component
-
seeFriendlyInvisibles
public boolean seeFriendlyInvisibles()Returns the value of theseeFriendlyInvisiblesrecord component.- Returns:
- the value of the
seeFriendlyInvisiblesrecord component
-
memberNamePrefix
Returns the value of thememberNamePrefixrecord component.- Returns:
- the value of the
memberNamePrefixrecord component
-
memberNameSuffix
Returns the value of thememberNameSuffixrecord component.- Returns:
- the value of the
memberNameSuffixrecord component
-
nameTagVisibility
Returns the value of thenameTagVisibilityrecord component.- Returns:
- the value of the
nameTagVisibilityrecord component
-
deathMessageVisibility
Returns the value of thedeathMessageVisibilityrecord component.- Returns:
- the value of the
deathMessageVisibilityrecord component
-
collisionRule
Returns the value of thecollisionRulerecord component.- Returns:
- the value of the
collisionRulerecord component
-
players
-