Record Class ClientboundSetPlayerTeamPacket.Parameters
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.Parameters
- Enclosing class:
ClientboundSetPlayerTeamPacket
public static record ClientboundSetPlayerTeamPacket.Parameters(Component displayName, Component playerPrefix, Component playerSuffix, Team.Visibility nameTagVisibility, Team.CollisionRule collisionRule, Optional<TeamColor> color, byte options)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Team.CollisionRuleThe field for thecollisionRulerecord component.The field for thecolorrecord component.private final ComponentThe field for thedisplayNamerecord component.private final Team.VisibilityThe field for thenameTagVisibilityrecord component.private final byteThe field for theoptionsrecord component.private final ComponentThe field for theplayerPrefixrecord component.private final ComponentThe field for theplayerSuffixrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionParameters(Component displayName, Component playerPrefix, Component playerSuffix, Team.Visibility nameTagVisibility, Team.CollisionRule collisionRule, Optional<TeamColor> color, byte options) Creates an instance of aParametersrecord class.Parameters(PlayerTeam team) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecollisionRulerecord component.color()Returns the value of thecolorrecord 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 thenameTagVisibilityrecord component.byteoptions()Returns the value of theoptionsrecord component.Returns the value of theplayerPrefixrecord component.Returns the value of theplayerSuffixrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
displayName
The field for thedisplayNamerecord component. -
playerPrefix
The field for theplayerPrefixrecord component. -
playerSuffix
The field for theplayerSuffixrecord component. -
nameTagVisibility
The field for thenameTagVisibilityrecord component. -
collisionRule
The field for thecollisionRulerecord component. -
color
-
options
private final byte optionsThe field for theoptionsrecord component. -
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, ClientboundSetPlayerTeamPacket.Parameters> STREAM_CODEC
-
-
Constructor Details
-
Parameters
-
Parameters
public Parameters(Component displayName, Component playerPrefix, Component playerSuffix, Team.Visibility nameTagVisibility, Team.CollisionRule collisionRule, Optional<TeamColor> color, byte options) Creates an instance of aParametersrecord class.- Parameters:
displayName- the value for thedisplayNamerecord componentplayerPrefix- the value for theplayerPrefixrecord componentplayerSuffix- the value for theplayerSuffixrecord componentnameTagVisibility- the value for thenameTagVisibilityrecord componentcollisionRule- the value for thecollisionRulerecord componentcolor- the value for thecolorrecord componentoptions- the value for theoptionsrecord 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. -
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
playerPrefix
Returns the value of theplayerPrefixrecord component.- Returns:
- the value of the
playerPrefixrecord component
-
playerSuffix
Returns the value of theplayerSuffixrecord component.- Returns:
- the value of the
playerSuffixrecord component
-
nameTagVisibility
Returns the value of thenameTagVisibilityrecord component.- Returns:
- the value of the
nameTagVisibilityrecord component
-
collisionRule
Returns the value of thecollisionRulerecord component.- Returns:
- the value of the
collisionRulerecord component
-
color
-
options
public byte options()Returns the value of theoptionsrecord component.- Returns:
- the value of the
optionsrecord component
-