Record Class BuildSpecification
java.lang.Object
java.lang.Record
fr.fidorial.version.BuildSpecification
- Record Components:
minecraftVersion- the Minecraft version implementedprotocolVersion- the protocol version clients must use to joinapiVersion- the Fidorial API version, for instance0.1.0version- the full server version, for instance26.3-build.42+0.1.0buildNumber- the CI build number, empty for a local build
public record BuildSpecification(MinecraftVersion minecraftVersion, int protocolVersion, String apiVersion, String version, OptionalInt buildNumber)
extends Record
The build of the running server.
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionBuildSpecification(MinecraftVersion minecraftVersion, int protocolVersion, String apiVersion, String version, OptionalInt buildNumber) Creates an instance of aBuildSpecificationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theapiVersionrecord component.Returns the value of thebuildNumberrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theminecraftVersionrecord component.intReturns the value of theprotocolVersionrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
BuildSpecification
public BuildSpecification(MinecraftVersion minecraftVersion, int protocolVersion, String apiVersion, String version, OptionalInt buildNumber) Creates an instance of aBuildSpecificationrecord class.- Parameters:
minecraftVersion- the value for theminecraftVersionrecord componentprotocolVersion- the value for theprotocolVersionrecord componentapiVersion- the value for theapiVersionrecord componentversion- the value for theversionrecord componentbuildNumber- the value for thebuildNumberrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
minecraftVersion
Returns the value of theminecraftVersionrecord component.- Returns:
- the value of the
minecraftVersionrecord component
-
protocolVersion
public int protocolVersion()Returns the value of theprotocolVersionrecord component.- Returns:
- the value of the
protocolVersionrecord component
-
apiVersion
Returns the value of theapiVersionrecord component.- Returns:
- the value of the
apiVersionrecord component
-
version
-
buildNumber
Returns the value of thebuildNumberrecord component.- Returns:
- the value of the
buildNumberrecord component
-