Package me.lucko.shadow.bukkit
Enum Class PackageVersion
- All Implemented Interfaces:
Serializable,Comparable<PackageVersion>,java.lang.constant.Constable
An enumeration of CraftBukkit package versions.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected @NonNull StringbooleanisAfter(@NonNull PackageVersion other)Gets if this version comes after theotherversion.booleanisAfterOrEq(@NonNull PackageVersion other)Gets if this version is the same as or comes after theotherversion.booleanisBefore(@NonNull PackageVersion other)Gets if this version comes before theotherversion.booleanisBeforeOrEq(@NonNull PackageVersion other)Gets if this version is the same as or comes before theotherversion.@NonNull StringPrepends the versioned NMS prefix to the given class name@NonNull Class<?>Prepends the versioned NMS prefix to the given class name@NonNull StringPrepends the versioned OBC prefix to the given class name@NonNull Class<?>Prepends the versioned OBC prefix to the given class namestatic @NonNull PackageVersionGets the package version for the current runtime server instance.static PackageVersionReturns the enum constant of this class with the specified name.static PackageVersion[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
-
v1_7_R1
-
v1_7_R2
-
v1_7_R3
-
v1_7_R4
-
v1_8_R1
-
v1_8_R2
-
v1_8_R3
-
v1_9_R1
-
v1_9_R2
-
v1_10_R1
-
v1_11_R1
-
v1_12_R1
-
v1_13_R1
-
v1_13_R2
-
v1_14_R1
-
v1_15_R1
-
v1_16_R1
-
v1_16_R2
-
v1_16_R3
-
v1_17_R1
-
v1_18_R1
-
v1_18_R2
-
-
Field Details
-
NMS
The nms prefix (without the version component)- See Also:
- Constant Field Values
-
NMS_MODERN
The nms prefix for 1.17+ (excludes version component)- See Also:
- Constant Field Values
-
OBC
The obc prefix (without the version component)- See Also:
- Constant Field Values
-
-
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
-
getPackageComponent
-
nms
Prepends the versioned NMS prefix to the given class name- Parameters:
className- the name of the class- Returns:
- the full class name
-
nmsClass
Prepends the versioned NMS prefix to the given class name- Parameters:
className- the name of the class- Returns:
- the class represented by the full class name
- Throws:
ClassNotFoundException
-
obc
Prepends the versioned OBC prefix to the given class name- Parameters:
className- the name of the class- Returns:
- the full class name
-
obcClass
Prepends the versioned OBC prefix to the given class name- Parameters:
className- the name of the class- Returns:
- the class represented by the full class name
- Throws:
ClassNotFoundException
-
isBefore
Gets if this version comes before theotherversion.- Parameters:
other- the other version- Returns:
- if it comes before
-
isAfter
Gets if this version comes after theotherversion.- Parameters:
other- the other version- Returns:
- if it comes after
-
isBeforeOrEq
Gets if this version is the same as or comes before theotherversion.- Parameters:
other- the other version- Returns:
- if it comes before or is the same
-
isAfterOrEq
Gets if this version is the same as or comes after theotherversion.- Parameters:
other- the other version- Returns:
- if it comes after or is the same
-
runtimeVersion
Gets the package version for the current runtime server instance.- Returns:
- the package version of the current runtime
-