Record Class WorldTemplate

java.lang.Object
java.lang.Record
com.mojang.realmsclient.dto.WorldTemplate

public record WorldTemplate(String id, String name, String version, String author, String link, @Nullable String image, String trailer, String recommendedPlayers, WorldTemplate.WorldTemplateType type) extends Record
  • Field Details

    • id

      private final String id
      The field for the id record component.
    • name

      private final String name
      The field for the name record component.
    • version

      private final String version
      The field for the version record component.
    • author

      private final String author
      The field for the author record component.
    • image

      private final @Nullable String image
      The field for the image record component.
    • trailer

      private final String trailer
      The field for the trailer record component.
    • recommendedPlayers

      private final String recommendedPlayers
      The field for the recommendedPlayers record component.
    • type

      private final WorldTemplate.WorldTemplateType type
      The field for the type record component.
    • LOGGER

      private static final org.slf4j.Logger LOGGER
  • Constructor Details

    • WorldTemplate

      public WorldTemplate(String id, String name, String version, String author, String link, @Nullable String image, String trailer, String recommendedPlayers, WorldTemplate.WorldTemplateType type)
      Creates an instance of a WorldTemplate record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      version - the value for the version record component
      author - the value for the author record component
      link - the value for the link record component
      image - the value for the image record component
      trailer - the value for the trailer record component
      recommendedPlayers - the value for the recommendedPlayers record component
      type - the value for the type record component
  • Method Details

    • parse

      public static @Nullable WorldTemplate parse(JsonObject node)
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • author

      public String author()
      Returns the value of the author record component.
      Returns:
      the value of the author record component
    • link

      public String link()
      Returns the value of the link record component.
      Returns:
      the value of the link record component
    • image

      public @Nullable String image()
      Returns the value of the image record component.
      Returns:
      the value of the image record component
    • trailer

      public String trailer()
      Returns the value of the trailer record component.
      Returns:
      the value of the trailer record component
    • recommendedPlayers

      public String recommendedPlayers()
      Returns the value of the recommendedPlayers record component.
      Returns:
      the value of the recommendedPlayers record component
    • type

      Returns the value of the type record component.
      Returns:
      the value of the type record component