Enum Version
- All Implemented Interfaces:
Serializable, Comparable<Version>, java.lang.constant.Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionVersion 1.16.5Version 1.17.1Version 1.18.2Version 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.11Version 1.21.2 - 1.21.3Version 1.21.4Version 1.21.5Version 1.21.6 - 1.21.8Version 1.21.9 - 1.21.10Version 26.1 or higher. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull VersionGets the version currently being used.booleanChecks whether theInventoryViewclass is an interface on this version.booleanisOlderThan(@NotNull Version version) Checks if this version is older than the provided version.static VersionReturns 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_16_5
-
V1_17_1
-
V1_18_2
-
V1_19_4
-
V1_20_0
-
V1_20_1
-
V1_20_2
-
V1_20_3_4
-
V1_20_5
-
V1_20_6
-
V1_21_0
-
V1_21_1
-
V1_21_2_3
-
V1_21_4
-
V1_21_5
-
V1_21_6_8
-
V1_21_9_10
-
V1_21_11
-
V26_1
-
-
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 theInventoryViewclass is an interface on this version.- Returns:
- true if the class is an interface, false otherwise
- Since:
- 0.10.16
-
isOlderThan
Checks if this version is older than the provided version.- Parameters:
version- the version to check if it is newer- Returns:
- true if this version is older, false otherwise
- Since:
- 0.11.6
-
getVersion
Gets the version currently being used. If the used version is not supported, anUnsupportedVersionExceptionwill be thrown.- Returns:
- the version of the current instance
- Since:
- 0.8.0
-