Record Class TeamsPacket.CreateTeamAction
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.TeamsPacket.CreateTeamAction
- All Implemented Interfaces:
ComponentHolder<TeamsPacket.CreateTeamAction>, TeamsPacket.Action
- Enclosing class:
TeamsPacket
public static record TeamsPacket.CreateTeamAction(Component displayName, byte friendlyFlags, TeamsPacket.NameTagVisibility nameTagVisibility, TeamsPacket.CollisionRule collisionRule, NamedTextColor teamColor, Component teamPrefix, Component teamSuffix, List<String> entities)
extends Record
implements TeamsPacket.Action, ComponentHolder<TeamsPacket.CreateTeamAction>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreateTeamAction(Component displayName, byte friendlyFlags, TeamsPacket.NameTagVisibility nameTagVisibility, TeamsPacket.CollisionRule collisionRule, NamedTextColor teamColor, Component teamPrefix, Component teamSuffix, List<String> entities) Creates an instance of aCreateTeamActionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecollisionRulerecord component.Gets the components held by this object.copyWithOperator(UnaryOperator<Component> operator) Returns a copy of this object.Returns the value of thedisplayNamerecord component.entities()Returns the value of theentitiesrecord component.final booleanIndicates whether some other object is "equal to" this one.byteReturns the value of thefriendlyFlagsrecord component.final inthashCode()Returns a hash code value for this object.intid()Returns the value of thenameTagVisibilityrecord component.Returns the value of theteamColorrecord component.Returns the value of theteamPrefixrecord component.Returns the value of theteamSuffixrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface ComponentHolder
visitComponents
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
CreateTeamAction
public CreateTeamAction(Component displayName, byte friendlyFlags, TeamsPacket.NameTagVisibility nameTagVisibility, TeamsPacket.CollisionRule collisionRule, NamedTextColor teamColor, Component teamPrefix, Component teamSuffix, List<String> entities) Creates an instance of aCreateTeamActionrecord class.- Parameters:
displayName- the value for thedisplayNamerecord componentfriendlyFlags- the value for thefriendlyFlagsrecord componentnameTagVisibility- the value for thenameTagVisibilityrecord componentcollisionRule- the value for thecollisionRulerecord componentteamColor- the value for theteamColorrecord componentteamPrefix- the value for theteamPrefixrecord componentteamSuffix- the value for theteamSuffixrecord componententities- the value for theentitiesrecord component
-
-
Method Details
-
id
public int id()- Specified by:
idin interfaceTeamsPacket.Action
-
components
Description copied from interface:ComponentHolderGets the components held by this object.- Specified by:
componentsin interfaceComponentHolder<TeamsPacket.CreateTeamAction>- Returns:
- the components
-
copyWithOperator
Description copied from interface:ComponentHolderReturns a copy of this object. For each component this object holds, the operator is applied to the copy before returning.- Specified by:
copyWithOperatorin interfaceComponentHolder<TeamsPacket.CreateTeamAction>- Parameters:
operator- the operator- Returns:
- the copy
-
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
-
friendlyFlags
public byte friendlyFlags()Returns the value of thefriendlyFlagsrecord component.- Returns:
- the value of the
friendlyFlagsrecord 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
-
teamColor
Returns the value of theteamColorrecord component.- Returns:
- the value of the
teamColorrecord component
-
teamPrefix
Returns the value of theteamPrefixrecord component.- Returns:
- the value of the
teamPrefixrecord component
-
teamSuffix
Returns the value of theteamSuffixrecord component.- Returns:
- the value of the
teamSuffixrecord component
-
entities
-