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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
is1_12()
boolean
is1_13()
boolean
is1_15()
boolean
is1_16()
boolean
is1_17()
boolean
boolean
boolean
is1_19()
boolean
boolean
boolean
boolean
boolean
boolean
isNewerOrEqualTo(@NotNull ServerVersion version)
Check whether the server version is newer than the given one or whether it is the sameboolean
isNewerThan(@NotNull ServerVersion version)
Check whether the server version is newer than the given oneboolean
isOlderOrEqualTo(@NotNull ServerVersion version)
Check whether the server version is older than the given one or whether it is the sameboolean
isOlderThan(@NotNull ServerVersion version)
Check whether the server version is older than the given onestatic ServerVersion
Returns 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- Since:
- 2.5.0
-
v1_20_R2
1.20.2- Since:
- 2.5.2
-
v1_20_R3
1.20.3 and 1.20.4- Since:
- 2.5.2
-
-
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() -
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
-