Enum Version
- All Implemented Interfaces:
Serializable
,Comparable<Version>
,java.lang.constant.Constable
The different supported NMS versions
- Since:
- 0.8.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionVersion 1.14Version 1.15Version 1.16.1Version 1.16.2 - 1.16.3Version 1.16.4 - 1.16.5Version 1.17Version 1.17.1Version 1.18.0Version 1.18.1Version 1.18.2Version 1.19.0Version 1.19.1Version 1.19.2Version 1.19.3Version 1.19.4Version 1.20.0Version 1.20.1Version 1.20.2Version 1.20.3 - 1.20.4Version 1.20.5Version 1.20.6Version 1.21.0Version 1.21.1Version 1.21.2 - 1.21.3Version 1.21.4 -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Version
Gets the version currently being used.boolean
Checks whether theInventoryView
class is an interface on this version.static Version
Returns the enum constant of this type with the specified name.static Version[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
V1_14
Version 1.14- Since:
- 0.10.0
-
V1_15
Version 1.15- Since:
- 0.10.0
-
V1_16_1
Version 1.16.1- Since:
- 0.10.0
-
V1_16_2_3
Version 1.16.2 - 1.16.3- Since:
- 0.10.0
-
V1_16_4_5
Version 1.16.4 - 1.16.5- Since:
- 0.10.0
-
V1_17_0
Version 1.17- Since:
- 0.10.0
-
V1_17_1
Version 1.17.1- Since:
- 0.10.0
-
V1_18_0
Version 1.18.0- Since:
- 0.10.4
-
V1_18_1
Version 1.18.1- Since:
- 0.10.4
-
V1_18_2
Version 1.18.2- Since:
- 0.10.5
-
V1_19_0
Version 1.19.0- Since:
- 0.10.6
-
V1_19_1
Version 1.19.1- Since:
- 0.10.7
-
V1_19_2
Version 1.19.2- Since:
- 0.10.7
-
V1_19_3
Version 1.19.3- Since:
- 0.10.8
-
V1_19_4
Version 1.19.4- Since:
- 0.10.9
-
V1_20_0
Version 1.20.0- Since:
- 0.10.14
-
V1_20_1
Version 1.20.1- Since:
- 0.10.14
-
V1_20_2
Version 1.20.2- Since:
- 0.10.12
-
V1_20_3_4
Version 1.20.3 - 1.20.4- Since:
- 0.10.13
-
V1_20_5
Version 1.20.5- Since:
- 0.10.14
-
V1_20_6
Version 1.20.6- Since:
- 0.10.14
-
V1_21_0
Version 1.21.0- Since:
- 0.10.18
-
V1_21_1
Version 1.21.1- Since:
- 0.10.18
-
V1_21_2_3
Version 1.21.2 - 1.21.3- Since:
- 0.10.18
-
V1_21_4
Version 1.21.4- Since:
- 0.10.19
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
isInventoryViewInterface
@Contract(pure=true) public boolean isInventoryViewInterface()Checks whether theInventoryView
class is an interface on this version.- Returns:
- true if the class is an interface, false otherwise
- Since:
- 0.10.16
-
getVersion
Gets the version currently being used. If the used version is not supported, anUnsupportedVersionException
will be thrown.- Returns:
- the version of the current instance
- Since:
- 0.8.0
-