Package one.pkg.tiny.utils.minecraft
Enum Class ProtocolVersion
- All Implemented Interfaces:
Serializable
,Comparable<ProtocolVersion>
,Constable
Represents the Minecraft Java Edition protocol version mapping table.
This mapping table is used to match protocol numbers to the lowest formal version when multiple versions share the same protocol number.
The mapping only includes protocol numbers for official release versions. It excludes protocol numbers for snapshot versions, pre-release versions, and April Fools' versions.
Note: For the most recent Minecraft releases, the protocol number may be unrecognized unless the dependency library is updated. In such cases, the protocol number is assumed to be that of the most recent release.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic ProtocolVersion
fromProtocolVersion
(int protocolVersion) Returns the corresponding ProtocolVersion for the given protocol number.int
Returns the protocol number for this ProtocolVersion.static ProtocolVersion
Returns the enum constant of this class with the specified name.static ProtocolVersion[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
-
PLAY_1_7
-
PLAY_1_7_2
-
PLAY_1_7_6
-
PLAY_1_8
-
PLAY_1_9
-
PLAY_1_9_1
-
PLAY_1_9_2
-
PLAY_1_9_3
-
PLAY_1_10
-
PLAY_1_11
-
PLAY_1_11_1
-
PLAY_1_12
-
PLAY_1_12_1
-
PLAY_1_12_2
-
PLAY_1_13
-
PLAY_1_13_1
-
PLAY_1_13_2
-
PLAY_1_14
-
PLAY_1_14_1
-
PLAY_1_14_2
-
PLAY_1_14_3
-
PLAY_1_14_4
-
PLAY_1_15
-
PLAY_1_15_1
-
PLAY_1_15_2
-
PLAY_1_16
-
PLAY_1_16_1
-
PLAY_1_16_2
-
PLAY_1_16_3
-
PLAY_1_16_4
-
PLAY_1_17
-
PLAY_1_17_1
-
PLAY_1_18
-
PLAY_1_18_2
-
PLAY_1_19
-
PLAY_1_19_1
-
PLAY_1_19_3
-
PLAY_1_19_4
-
PLAY_1_20
-
PLAY_1_20_2
-
PLAY_1_20_3
-
PLAY_1_20_5
-
PLAY_1_21
-
PLAY_1_21_2
-
PLAY_1_21_4
-
PLAY_1_21_5
-
PLAY_1_21_6
-
PLAY_1_21_7
-
PLAY_1_21_9
-
-
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
-
fromProtocolVersion
Returns the corresponding ProtocolVersion for the given protocol number.- Parameters:
protocolVersion
- the protocol number to look up- Returns:
- the ProtocolVersion mapped to the given protocol number, or UNKNOWN if the protocol is not supported or recognized
-
getProtocolVersion
public int getProtocolVersion()Returns the protocol number for this ProtocolVersion.- Returns:
- the protocol number
-