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 aCreateTeamAction
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecollisionRule
record component.@NotNull Collection
<Component> Gets the components held by this object.@NotNull TeamsPacket.CreateTeamAction
copyWithOperator
(@NotNull UnaryOperator<Component> operator) Returns a copy of this object.Returns the value of thedisplayName
record component.entities()
Returns the value of theentities
record component.final boolean
Indicates whether some other object is "equal to" this one.byte
Returns the value of thefriendlyFlags
record component.final int
hashCode()
Returns a hash code value for this object.int
id()
Returns the value of thenameTagVisibility
record component.Returns the value of theteamColor
record component.Returns the value of theteamPrefix
record component.Returns the value of theteamSuffix
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minestom.server.adventure.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 aCreateTeamAction
record class.- Parameters:
displayName
- the value for thedisplayName
record componentfriendlyFlags
- the value for thefriendlyFlags
record componentnameTagVisibility
- the value for thenameTagVisibility
record componentcollisionRule
- the value for thecollisionRule
record componentteamColor
- the value for theteamColor
record componentteamPrefix
- the value for theteamPrefix
record componentteamSuffix
- the value for theteamSuffix
record componententities
- the value for theentities
record component
-
-
Method Details
-
id
public int id()- Specified by:
id
in interfaceTeamsPacket.Action
-
components
Description copied from interface:ComponentHolder
Gets the components held by this object.- Specified by:
components
in interfaceComponentHolder<TeamsPacket.CreateTeamAction>
- Returns:
- the components
-
copyWithOperator
@NotNull public @NotNull TeamsPacket.CreateTeamAction copyWithOperator(@NotNull @NotNull UnaryOperator<Component> operator) Description copied from interface:ComponentHolder
Returns a copy of this object. For each component this object holds, the operator is applied to the copy before returning.- Specified by:
copyWithOperator
in 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 thecompare
method from their corresponding wrapper classes. -
displayName
Returns the value of thedisplayName
record component.- Returns:
- the value of the
displayName
record component
-
friendlyFlags
public byte friendlyFlags()Returns the value of thefriendlyFlags
record component.- Returns:
- the value of the
friendlyFlags
record component
-
nameTagVisibility
Returns the value of thenameTagVisibility
record component.- Returns:
- the value of the
nameTagVisibility
record component
-
collisionRule
Returns the value of thecollisionRule
record component.- Returns:
- the value of the
collisionRule
record component
-
teamColor
Returns the value of theteamColor
record component.- Returns:
- the value of the
teamColor
record component
-
teamPrefix
Returns the value of theteamPrefix
record component.- Returns:
- the value of the
teamPrefix
record component
-
teamSuffix
Returns the value of theteamSuffix
record component.- Returns:
- the value of the
teamSuffix
record component
-
entities
-