Record Class ServerPlatform
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.platform.ServerPlatform
- Record Components:
minecraftVersion- the Minecraft version, such as"1.21.10"serverName- the server software, such as"Paper"serverVersion- the server software's full version stringjavaVersion- the feature version of the running Java, such as21supported- whether Zentrix supports this Minecraft version and softwarebeta- whether support for this Minecraft version is still in beta
public record ServerPlatform(@NotNull String minecraftVersion, @NotNull String serverName, @NotNull String serverVersion, int javaVersion, boolean supported, boolean beta)
extends Record
The server Zentrix runs on.
- Since:
- 1.8.0
-
Constructor Summary
ConstructorsConstructorDescriptionServerPlatform(@NotNull String minecraftVersion, @NotNull String serverName, @NotNull String serverVersion, int javaVersion, boolean supported, boolean beta) Creates an instance of aServerPlatformrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbeta()Returns the value of thebetarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thejavaVersionrecord component.@NotNull StringReturns the value of theminecraftVersionrecord component.@NotNull StringReturns the value of theserverNamerecord component.@NotNull StringReturns the value of theserverVersionrecord component.booleanReturns the value of thesupportedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ServerPlatform
public ServerPlatform(@NotNull @NotNull String minecraftVersion, @NotNull @NotNull String serverName, @NotNull @NotNull String serverVersion, int javaVersion, boolean supported, boolean beta) Creates an instance of aServerPlatformrecord class.- Parameters:
minecraftVersion- the value for theminecraftVersionrecord componentserverName- the value for theserverNamerecord componentserverVersion- the value for theserverVersionrecord componentjavaVersion- the value for thejavaVersionrecord componentsupported- the value for thesupportedrecord componentbeta- the value for thebetarecord component
-
-
Method Details
-
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 '=='. -
minecraftVersion
Returns the value of theminecraftVersionrecord component.- Returns:
- the value of the
minecraftVersionrecord component
-
serverName
Returns the value of theserverNamerecord component.- Returns:
- the value of the
serverNamerecord component
-
serverVersion
Returns the value of theserverVersionrecord component.- Returns:
- the value of the
serverVersionrecord component
-
javaVersion
public int javaVersion()Returns the value of thejavaVersionrecord component.- Returns:
- the value of the
javaVersionrecord component
-
supported
public boolean supported()Returns the value of thesupportedrecord component.- Returns:
- the value of the
supportedrecord component
-
beta
public boolean beta()Returns the value of thebetarecord component.- Returns:
- the value of the
betarecord component
-