Record Class Status

java.lang.Object
java.lang.Record
net.minestom.server.ping.Status

public record Status(@NotNull Component description, byte @Nullable [] favicon, @NotNull Status.VersionInfo versionInfo, @Nullable Status.PlayerInfo playerInfo, boolean enforcesSecureChat) extends Record
  • Field Details

    • FAVICON_CODEC

      public static final Codec<byte @Nullable []> FAVICON_CODEC
    • CODEC

      public static final Codec<Status> CODEC
  • Constructor Details

    • Status

      public Status(@NotNull @NotNull Component description, byte @Nullable [] favicon, @NotNull @NotNull Status.VersionInfo versionInfo, @Nullable @Nullable Status.PlayerInfo playerInfo, boolean enforcesSecureChat)
      Creates an instance of a Status record class.
      Parameters:
      description - the value for the description record component
      favicon - the value for the favicon record component
      versionInfo - the value for the versionInfo record component
      playerInfo - the value for the playerInfo record component
      enforcesSecureChat - the value for the enforcesSecureChat record component
  • Method Details

    • builder

      @NotNull public static @NotNull Status.Builder builder()
    • builder

      @NotNull public static @NotNull Status.Builder builder(@NotNull @NotNull Status status)
    • 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 '=='.
      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.
    • description

      @NotNull public @NotNull Component description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • favicon

      public byte @Nullable [] favicon()
      Returns the value of the favicon record component.
      Returns:
      the value of the favicon record component
    • versionInfo

      @NotNull public @NotNull Status.VersionInfo versionInfo()
      Returns the value of the versionInfo record component.
      Returns:
      the value of the versionInfo record component
    • playerInfo

      @Nullable public @Nullable Status.PlayerInfo playerInfo()
      Returns the value of the playerInfo record component.
      Returns:
      the value of the playerInfo record component
    • enforcesSecureChat

      public boolean enforcesSecureChat()
      Returns the value of the enforcesSecureChat record component.
      Returns:
      the value of the enforcesSecureChat record component