Enum Class ServerVersion

java.lang.Object
java.lang.Enum<ServerVersion>
nl.mtvehicles.core.infrastructure.enums.ServerVersion
All Implemented Interfaces:
Serializable, Comparable<ServerVersion>, Constable

public enum ServerVersion extends Enum<ServerVersion>
Enum of supported server versions (used for different NMS and Spigot API changes)
  • Enum Constant Details

    • v1_12

      public static final ServerVersion v1_12
      1.12-1.12.2
    • v1_13

      public static final ServerVersion v1_13
      1.13.1-1.13.2
    • v1_15

      public static final ServerVersion v1_15
      1.15-1.15.2
    • v1_16

      public static final ServerVersion v1_16
      1.16.4-1.16.5
    • v1_17

      public static final ServerVersion v1_17
      1.17-1.17.1
    • v1_18_R1

      public static final ServerVersion v1_18_R1
      1.18-1.18.1
    • v1_18_R2

      public static final ServerVersion v1_18_R2
      1.18.2
    • v1_19_R1

      public static final ServerVersion v1_19_R1
      1.19-1.19.2
      Since:
      2.4.3
    • v1_19_R2

      public static final ServerVersion v1_19_R2
      1.19.3
      Since:
      2.5.0
    • v1_19_R3

      public static final ServerVersion v1_19_R3
      1.19.4
      Since:
      2.5.0
    • v1_20_R1

      public static final ServerVersion v1_20_R1
      1.20
      Since:
      2.5.0
    • v1_20_R2

      public static final ServerVersion v1_20_R2
      1.20.2
      Since:
      2.5.2
    • v1_20_R3

      public static final ServerVersion v1_20_R3
      1.20.3 and 1.20.4
      Since:
      2.5.2
  • 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
    • is1_12

      public boolean is1_12()
    • is1_13

      public boolean is1_13()
    • is1_15

      public boolean is1_15()
    • is1_16

      public boolean is1_16()
    • is1_17

      public boolean is1_17()
    • is1_18_R1

      public boolean is1_18_R1()
    • is1_18_R2

      public boolean is1_18_R2()
    • is1_19

      public boolean is1_19()
    • is1_19_R2

      public boolean is1_19_R2()
    • is1_19_R3

      public boolean is1_19_R3()
    • is1_20_R1

      public boolean is1_20_R1()
    • is1_20_R2

      public boolean is1_20_R2()
    • is1_20_R3

      public boolean is1_20_R3()
    • isOlderThan

      public boolean isOlderThan(@NotNull @NotNull ServerVersion version)
      Check whether the server version is older than the given one
    • isOlderOrEqualTo

      public boolean isOlderOrEqualTo(@NotNull @NotNull ServerVersion version)
      Check whether the server version is older than the given one or whether it is the same
    • isNewerThan

      public boolean isNewerThan(@NotNull @NotNull ServerVersion version)
      Check whether the server version is newer than the given one
    • isNewerOrEqualTo

      public boolean isNewerOrEqualTo(@NotNull @NotNull ServerVersion version)
      Check whether the server version is newer than the given one or whether it is the same