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 string
javaVersion - the feature version of the running Java, such as 21
supported - whether Zentrix supports this Minecraft version and software
beta - 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 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 a ServerPlatform record class.
      Parameters:
      minecraftVersion - the value for the minecraftVersion record component
      serverName - the value for the serverName record component
      serverVersion - the value for the serverVersion record component
      javaVersion - the value for the javaVersion record component
      supported - the value for the supported record component
      beta - the value for the beta record component
  • Method Details

    • 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.
    • minecraftVersion

      @NotNull public @NotNull String minecraftVersion()
      Returns the value of the minecraftVersion record component.
      Returns:
      the value of the minecraftVersion record component
    • serverName

      @NotNull public @NotNull String serverName()
      Returns the value of the serverName record component.
      Returns:
      the value of the serverName record component
    • serverVersion

      @NotNull public @NotNull String serverVersion()
      Returns the value of the serverVersion record component.
      Returns:
      the value of the serverVersion record component
    • javaVersion

      public int javaVersion()
      Returns the value of the javaVersion record component.
      Returns:
      the value of the javaVersion record component
    • supported

      public boolean supported()
      Returns the value of the supported record component.
      Returns:
      the value of the supported record component
    • beta

      public boolean beta()
      Returns the value of the beta record component.
      Returns:
      the value of the beta record component