Record Class GeyserExtensionDescription

java.lang.Object
java.lang.Record
org.geysermc.geyser.extension.GeyserExtensionDescription
All Implemented Interfaces:
org.geysermc.geyser.api.extension.ExtensionDescription

public record GeyserExtensionDescription(@NonNull String id, @NonNull String name, @NonNull String main, int majorApiVersion, int minorApiVersion, int patchApiVersion, @NonNull String version, @NonNull List<String> authors) extends Record implements org.geysermc.geyser.api.extension.ExtensionDescription
  • Field Details

    • ID_PATTERN

      public static final Pattern ID_PATTERN
    • NAME_PATTERN

      public static final Pattern NAME_PATTERN
    • API_VERSION_PATTERN

      public static final Pattern API_VERSION_PATTERN
  • Constructor Details

    • GeyserExtensionDescription

      public GeyserExtensionDescription(@NonNull String id, @NonNull String name, @NonNull String main, int majorApiVersion, int minorApiVersion, int patchApiVersion, @NonNull String version, @NonNull List<String> authors)
      Creates an instance of a GeyserExtensionDescription record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      main - the value for the main record component
      majorApiVersion - the value for the majorApiVersion record component
      minorApiVersion - the value for the minorApiVersion record component
      patchApiVersion - the value for the patchApiVersion record component
      version - the value for the version record component
      authors - the value for the authors record component
  • Method Details

    • fromYaml

      public static @NonNull GeyserExtensionDescription fromYaml(Reader reader) throws org.geysermc.geyser.api.extension.exception.InvalidDescriptionException
      Throws:
      org.geysermc.geyser.api.extension.exception.InvalidDescriptionException
    • 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.
    • id

      public @NonNull String id()
      Returns the value of the id record component.
      Specified by:
      id in interface org.geysermc.geyser.api.extension.ExtensionDescription
      Returns:
      the value of the id record component
    • name

      public @NonNull String name()
      Returns the value of the name record component.
      Specified by:
      name in interface org.geysermc.geyser.api.extension.ExtensionDescription
      Returns:
      the value of the name record component
    • main

      public @NonNull String main()
      Returns the value of the main record component.
      Specified by:
      main in interface org.geysermc.geyser.api.extension.ExtensionDescription
      Returns:
      the value of the main record component
    • majorApiVersion

      public int majorApiVersion()
      Returns the value of the majorApiVersion record component.
      Specified by:
      majorApiVersion in interface org.geysermc.geyser.api.extension.ExtensionDescription
      Returns:
      the value of the majorApiVersion record component
    • minorApiVersion

      public int minorApiVersion()
      Returns the value of the minorApiVersion record component.
      Specified by:
      minorApiVersion in interface org.geysermc.geyser.api.extension.ExtensionDescription
      Returns:
      the value of the minorApiVersion record component
    • patchApiVersion

      public int patchApiVersion()
      Returns the value of the patchApiVersion record component.
      Specified by:
      patchApiVersion in interface org.geysermc.geyser.api.extension.ExtensionDescription
      Returns:
      the value of the patchApiVersion record component
    • version

      public @NonNull String version()
      Returns the value of the version record component.
      Specified by:
      version in interface org.geysermc.geyser.api.extension.ExtensionDescription
      Returns:
      the value of the version record component
    • authors

      public @NonNull List<String> authors()
      Returns the value of the authors record component.
      Specified by:
      authors in interface org.geysermc.geyser.api.extension.ExtensionDescription
      Returns:
      the value of the authors record component