Record Class TeamsPacket.Settings
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.TeamsPacket.Settings
- All Implemented Interfaces:
ComponentHolder<TeamsPacket.Settings>
- Enclosing class:
TeamsPacket
public static record TeamsPacket.Settings(Component displayName, Component teamPrefix, Component teamSuffix, TeamsPacket.NameTagVisibility nameTagVisibility, TeamsPacket.CollisionRule collisionRule, @Nullable TeamColor color, byte friendlyFlags)
extends Record
implements ComponentHolder<TeamsPacket.Settings>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSettings(Component displayName, Component teamPrefix, Component teamSuffix, TeamsPacket.NameTagVisibility nameTagVisibility, TeamsPacket.CollisionRule collisionRule, @Nullable TeamColor color, byte friendlyFlags) Creates an instance of aSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecollisionRulerecord component.color()Returns the value of thecolorrecord component.Gets the components held by this object.copyWithOperator(UnaryOperator<Component> operator) Returns a copy of this object.Returns 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.Returns the value of thenameTagVisibilityrecord 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
-
Settings
public Settings(Component displayName, Component teamPrefix, Component teamSuffix, TeamsPacket.NameTagVisibility nameTagVisibility, TeamsPacket.CollisionRule collisionRule, @Nullable @Nullable TeamColor color, byte friendlyFlags) Creates an instance of aSettingsrecord class.- Parameters:
displayName- the value for thedisplayNamerecord componentteamPrefix- the value for theteamPrefixrecord componentteamSuffix- the value for theteamSuffixrecord componentnameTagVisibility- the value for thenameTagVisibilityrecord componentcollisionRule- the value for thecollisionRulerecord componentcolor- the value for thecolorrecord componentfriendlyFlags- the value for thefriendlyFlagsrecord component
-
-
Method Details
-
components
Description copied from interface:ComponentHolderGets the components held by this object.- Specified by:
componentsin interfaceComponentHolder<TeamsPacket.Settings>- 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.Settings>- 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
-
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
-
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
-
friendlyFlags
public byte friendlyFlags()Returns the value of thefriendlyFlagsrecord component.- Returns:
- the value of the
friendlyFlagsrecord component
-