Package beer.devs.fastnbt.nms
Enum Version
- All Implemented Interfaces:
Serializable
,Comparable<Version>
,java.lang.constant.Constable
Protocol version.
https://wiki.vg/Protocol_version_numbers
https://minecraft.wiki/w/Protocol_version
-
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 TypeMethodDescriptionstatic Version
static Version
get()
static boolean
Determines if the current version meets or exceeds the specified versionstatic boolean
isNewerThan
(Version version) Verifies if the current version is an upgrade over the specified version.static boolean
isOlderThan
(Version version) Verifies if the current version is a lower version compared to the specified 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
-
Field Details
-
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
-
byName
-
isAtLeast
Determines if the current version meets or exceeds the specified version- Parameters:
version
- The minimum version- Returns:
- true if the current version is at least the specified version, false otherwise.
-
isNewerThan
Verifies if the current version is an upgrade over the specified version.- Parameters:
version
- The minimum version- Returns:
- true if the current version is newer than the specified version, false otherwise.
-
isOlderThan
Verifies if the current version is a lower version compared to the specified version.- Parameters:
version
- The maximum version- Returns:
- true if the current version is lower than the specified version, false otherwise.
-
get
-