Enum Version

java.lang.Object
java.lang.Enum<Version>
beer.devs.fastnbt.nms.Version
All Implemented Interfaces:
Serializable, Comparable<Version>, java.lang.constant.Constable

public enum Version extends Enum<Version>
Protocol version. https://wiki.vg/Protocol_version_numbers https://minecraft.wiki/w/Protocol_version
  • Enum Constant Details

    • UNKNOWN

      public static final Version UNKNOWN
    • v1_15_R1

      @Deprecated public static final Version v1_15_R1
      Deprecated.
    • v1_16_R3

      @Deprecated public static final Version v1_16_R3
      Deprecated.
    • v1_17_R1

      public static final Version v1_17_R1
    • v1_18_R1

      public static final Version v1_18_R1
    • v1_18_R2

      public static final Version v1_18_R2
    • v1_19_R1

      public static final Version v1_19_R1
    • v1_19_R2

      public static final Version v1_19_R2
    • v1_19_R3

      public static final Version v1_19_R3
    • v1_20_R1

      public static final Version v1_20_R1
    • v1_20_R2

      public static final Version v1_20_R2
    • v1_20_R3

      public static final Version v1_20_R3
    • v1_20_4

      public static final Version v1_20_4
    • v1_20_5

      public static final Version v1_20_5
    • v1_20_6

      public static final Version v1_20_6
    • v1_21

      public static final Version v1_21
    • v1_21_1

      public static final Version v1_21_1
    • v1_21_3

      public static final Version v1_21_3
    • v1_21_4

      public static final Version v1_21_4
  • Field Details

    • id

      public final int id
      Protocol ID.
    • protocol

      public final int protocol
    • name

      public final String name
  • Method Details

    • values

      public static Version[] 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

      public static Version valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • byName

      public static Version byName(String name)
    • isAtLeast

      public static boolean isAtLeast(Version version)
      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

      public static boolean isNewerThan(Version version)
      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

      public static boolean isOlderThan(Version version)
      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

      public static Version get()