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 Details

    • displayName

      private final Component displayName
      The field for the displayName record component.
    • playerPrefix

      private final Component playerPrefix
      The field for the playerPrefix record component.
    • playerSuffix

      private final Component playerSuffix
      The field for the playerSuffix record component.
    • nameTagVisibility

      private final Team.Visibility nameTagVisibility
      The field for the nameTagVisibility record component.
    • collisionRule

      private final Team.CollisionRule collisionRule
      The field for the collisionRule record component.
    • color

      private final Optional<TeamColor> color
      The field for the color record component.
    • options

      private final byte options
      The field for the options record component.
    • STREAM_CODEC

  • Constructor Details

    • Parameters

      public Parameters(PlayerTeam team)
    • Parameters

      public Parameters(Component displayName, Component playerPrefix, Component playerSuffix, Team.Visibility nameTagVisibility, Team.CollisionRule collisionRule, Optional<TeamColor> color, byte options)
      Creates an instance of a Parameters record class.
      Parameters:
      displayName - the value for the displayName record component
      playerPrefix - the value for the playerPrefix record component
      playerSuffix - the value for the playerSuffix record component
      nameTagVisibility - the value for the nameTagVisibility record component
      collisionRule - the value for the collisionRule record component
      color - the value for the color record component
      options - the value for the options record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • displayName

      public Component displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • playerPrefix

      public Component playerPrefix()
      Returns the value of the playerPrefix record component.
      Returns:
      the value of the playerPrefix record component
    • playerSuffix

      public Component playerSuffix()
      Returns the value of the playerSuffix record component.
      Returns:
      the value of the playerSuffix record component
    • nameTagVisibility

      public Team.Visibility nameTagVisibility()
      Returns the value of the nameTagVisibility record component.
      Returns:
      the value of the nameTagVisibility record component
    • collisionRule

      public Team.CollisionRule collisionRule()
      Returns the value of the collisionRule record component.
      Returns:
      the value of the collisionRule record component
    • color

      public Optional<TeamColor> color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component
    • options

      public byte options()
      Returns the value of the options record component.
      Returns:
      the value of the options record component