Package org.geysermc.geyser.extension
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 humanApiVersion, int majorApiVersion, int minorApiVersion, @NonNull String version, @NonNull List<String> authors)
extends Record
implements org.geysermc.geyser.api.extension.ExtensionDescription
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthors()Returns the value of theauthorsrecord component.final booleanIndicates whether some other object is "equal to" this one.static @NonNull GeyserExtensionDescriptionfinal inthashCode()Returns a hash code value for this object.intReturns the value of thehumanApiVersionrecord component.@NonNull Stringid()Returns the value of theidrecord component.@NonNull Stringmain()Returns the value of themainrecord component.intReturns the value of themajorApiVersionrecord component.intReturns the value of theminorApiVersionrecord component.@NonNull Stringname()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.@NonNull Stringversion()Returns the value of theversionrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.geyser.api.extension.ExtensionDescription
apiVersion, patchApiVersion
-
Field Details
-
ID_PATTERN
-
NAME_PATTERN
-
API_VERSION_PATTERN
-
-
Constructor Details
-
GeyserExtensionDescription
public GeyserExtensionDescription(@NonNull String id, @NonNull String name, @NonNull String main, int humanApiVersion, int majorApiVersion, int minorApiVersion, @NonNull String version, @NonNull List<String> authors) Creates an instance of aGeyserExtensionDescriptionrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentmain- the value for themainrecord componenthumanApiVersion- the value for thehumanApiVersionrecord componentmajorApiVersion- the value for themajorApiVersionrecord componentminorApiVersion- the value for theminorApiVersionrecord componentversion- the value for theversionrecord componentauthors- the value for theauthorsrecord 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
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. -
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. -
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 '=='. -
id
Returns the value of theidrecord component.- Specified by:
idin interfaceorg.geysermc.geyser.api.extension.ExtensionDescription- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceorg.geysermc.geyser.api.extension.ExtensionDescription- Returns:
- the value of the
namerecord component
-
main
Returns the value of themainrecord component.- Specified by:
mainin interfaceorg.geysermc.geyser.api.extension.ExtensionDescription- Returns:
- the value of the
mainrecord component
-
humanApiVersion
public int humanApiVersion()Returns the value of thehumanApiVersionrecord component.- Specified by:
humanApiVersionin interfaceorg.geysermc.geyser.api.extension.ExtensionDescription- Returns:
- the value of the
humanApiVersionrecord component
-
majorApiVersion
public int majorApiVersion()Returns the value of themajorApiVersionrecord component.- Specified by:
majorApiVersionin interfaceorg.geysermc.geyser.api.extension.ExtensionDescription- Returns:
- the value of the
majorApiVersionrecord component
-
minorApiVersion
public int minorApiVersion()Returns the value of theminorApiVersionrecord component.- Specified by:
minorApiVersionin interfaceorg.geysermc.geyser.api.extension.ExtensionDescription- Returns:
- the value of the
minorApiVersionrecord component
-
version
Returns the value of theversionrecord component.- Specified by:
versionin interfaceorg.geysermc.geyser.api.extension.ExtensionDescription- Returns:
- the value of the
versionrecord component
-
authors
Returns the value of theauthorsrecord component.- Specified by:
authorsin interfaceorg.geysermc.geyser.api.extension.ExtensionDescription- Returns:
- the value of the
authorsrecord component
-