Record Class TeamsPacket.UpdateTeamAction
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.TeamsPacket.UpdateTeamAction
- All Implemented Interfaces:
ComponentHolder<TeamsPacket.UpdateTeamAction>,NetworkBuffer.Writer,TeamsPacket.Action
- Enclosing class:
TeamsPacket
public static record TeamsPacket.UpdateTeamAction(net.kyori.adventure.text.Component displayName, byte friendlyFlags, TeamsPacket.NameTagVisibility nameTagVisibility, TeamsPacket.CollisionRule collisionRule, net.kyori.adventure.text.format.NamedTextColor teamColor, net.kyori.adventure.text.Component teamPrefix, net.kyori.adventure.text.Component teamSuffix)
extends Record
implements TeamsPacket.Action, ComponentHolder<TeamsPacket.UpdateTeamAction>
-
Constructor Summary
ConstructorsConstructorDescriptionUpdateTeamAction(net.kyori.adventure.text.Component displayName, byte friendlyFlags, TeamsPacket.NameTagVisibility nameTagVisibility, TeamsPacket.CollisionRule collisionRule, net.kyori.adventure.text.format.NamedTextColor teamColor, net.kyori.adventure.text.Component teamPrefix, net.kyori.adventure.text.Component teamSuffix) Creates an instance of aUpdateTeamActionrecord class.UpdateTeamAction(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecollisionRulerecord component.@NotNull Collection<net.kyori.adventure.text.Component> Gets the components held by this object.@NotNull TeamsPacket.UpdateTeamActioncopyWithOperator(@NotNull UnaryOperator<net.kyori.adventure.text.Component> operator) Returns a copy of this object.net.kyori.adventure.text.ComponentReturns the value of thedisplayNamerecord 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.net.kyori.adventure.text.format.NamedTextColorReturns the value of theteamColorrecord component.net.kyori.adventure.text.ComponentReturns the value of theteamPrefixrecord component.net.kyori.adventure.text.ComponentReturns the value of theteamSuffixrecord component.final StringtoString()Returns a string representation of this record class.voidwrite(@NotNull NetworkBuffer writer) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minestom.server.adventure.ComponentHolder
visitComponents
-
Constructor Details
-
UpdateTeamAction
-
UpdateTeamAction
public UpdateTeamAction(net.kyori.adventure.text.Component displayName, byte friendlyFlags, TeamsPacket.NameTagVisibility nameTagVisibility, TeamsPacket.CollisionRule collisionRule, net.kyori.adventure.text.format.NamedTextColor teamColor, net.kyori.adventure.text.Component teamPrefix, net.kyori.adventure.text.Component teamSuffix) Creates an instance of aUpdateTeamActionrecord 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 component
-
-
Method Details
-
write
- Specified by:
writein interfaceNetworkBuffer.Writer
-
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.UpdateTeamAction>- Returns:
- the components
-
copyWithOperator
@NotNull public @NotNull TeamsPacket.UpdateTeamAction copyWithOperator(@NotNull @NotNull UnaryOperator<net.kyori.adventure.text.Component> operator) 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.UpdateTeamAction>- Parameters:
operator- the operator- Returns:
- the copy
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
displayName
public net.kyori.adventure.text.Component 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
public net.kyori.adventure.text.format.NamedTextColor teamColor()Returns the value of theteamColorrecord component.- Returns:
- the value of the
teamColorrecord component
-
teamPrefix
public net.kyori.adventure.text.Component teamPrefix()Returns the value of theteamPrefixrecord component.- Returns:
- the value of the
teamPrefixrecord component
-
teamSuffix
public net.kyori.adventure.text.Component teamSuffix()Returns the value of theteamSuffixrecord component.- Returns:
- the value of the
teamSuffixrecord component
-