Enum Class ServerVersion

java.lang.Object
java.lang.Enum<ServerVersion>
me.m64diamondstar.dialoguemaster.api.utils.ServerVersion
All Implemented Interfaces:
Serializable, Comparable<ServerVersion>, Constable

public enum ServerVersion extends Enum<ServerVersion>
All the Minecraft versions that DialogueMaster currently supports.
  • Enum Constant Details

  • Method Details

    • values

      public static ServerVersion[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ServerVersion valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getPackFormat

      public int getPackFormat()
    • isGreaterThan

      public boolean isGreaterThan(ServerVersion other)
    • isLessThan

      public boolean isLessThan(ServerVersion other)
    • isEqualTo

      public boolean isEqualTo(ServerVersion other)
    • getFromString

      @NotNull public static @NotNull ServerVersion getFromString(String version)
      Converts a string to a ServerVersion. Only accepts versions that are in the format "vX_Y_RZ". For example: "v1_16_R1", "v1_19_R3", "v1_20_R0", etc.
      Returns:
      The ServerVersion or null if the version is not supported.