Enum Class ServerVersion
- All Implemented Interfaces:
Serializable,Comparable<ServerVersion>,Constable
Enum of supported server versions (used for different NMS and Spigot API changes)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription1.12-1.12.21.13.1-1.13.21.15-1.15.21.16.4-1.16.51.17-1.17.11.18-1.18.11.18.21.19-1.19.21.19.31.19.41.20 and 1.20.11.20.21.20.3 and 1.20.41.20.5 and 1.20.61.21 and 1.21.11.21.2 and 1.21.31.21.41.21.51.21.6, 1.21.7 and 1.21.81.21.9 and 1.21.10 -
Method Summary
Modifier and TypeMethodDescriptionbooleanis1_12()booleanis1_13()booleanis1_15()booleanis1_16()booleanis1_17()booleanbooleanbooleanis1_19()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisNewerOrEqualTo(@NotNull ServerVersion version) Check whether the server version is newer than the given one or whether it is the samebooleanisNewerThan(@NotNull ServerVersion version) Check whether the server version is newer than the given onebooleanisOlderOrEqualTo(@NotNull ServerVersion version) Check whether the server version is older than the given one or whether it is the samebooleanisOlderThan(@NotNull ServerVersion version) Check whether the server version is older than the given onestatic ServerVersionReturns the enum constant of this class with the specified name.static ServerVersion[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
v1_12
1.12-1.12.2 -
v1_13
1.13.1-1.13.2 -
v1_15
1.15-1.15.2 -
v1_16
1.16.4-1.16.5 -
v1_17
1.17-1.17.1 -
v1_18_R1
1.18-1.18.1 -
v1_18_R2
1.18.2 -
v1_19_R1
1.19-1.19.2- Since:
- 2.4.3
-
v1_19_R2
1.19.3- Since:
- 2.5.0
-
v1_19_R3
1.19.4- Since:
- 2.5.0
-
v1_20_R1
1.20 and 1.20.1- Since:
- 2.5.6
-
v1_20_R2
1.20.2- Since:
- 2.5.2
-
v1_20_R3
1.20.3 and 1.20.4- Since:
- 2.5.2
-
v1_20_R4
1.20.5 and 1.20.6- Since:
- 2.5.4
-
v1_21_R1
1.21 and 1.21.1- Since:
- 2.5.4
-
v1_21_R2
1.21.2 and 1.21.3- Since:
- 2.5.5
-
v1_21_R3
1.21.4- Since:
- 2.5.5
-
v1_21_R4
1.21.5- Since:
- 2.5.6
-
v1_21_R5
1.21.6, 1.21.7 and 1.21.8- Since:
- 2.5.6
-
v1_21_R6
1.21.9 and 1.21.10- Since:
- 2.5.8
-
-
Method Details
-
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
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 nameNullPointerException- 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() -
is1_20_R4
public boolean is1_20_R4() -
is1_21_R1
public boolean is1_21_R1() -
is1_21_R2
public boolean is1_21_R2() -
is1_21_R3
public boolean is1_21_R3() -
is1_21_R4
public boolean is1_21_R4() -
is1_21_R5
public boolean is1_21_R5() -
is1_21_R6
public boolean is1_21_R6() -
isOlderThan
Check whether the server version is older than the given one -
isOlderOrEqualTo
Check whether the server version is older than the given one or whether it is the same -
isNewerThan
Check whether the server version is newer than the given one -
isNewerOrEqualTo
Check whether the server version is newer than the given one or whether it is the same
-