Enum MinecraftVersion

    • Enum Constant Detail

      • MINECRAFT_1_13

        public static final MinecraftVersion MINECRAFT_1_13
        This constant represents Minecraft (Java Edition) Version 1.14 (The Update Aquatic)
      • MINECRAFT_1_14

        public static final MinecraftVersion MINECRAFT_1_14
        This constant represents Minecraft (Java Edition) Version 1.14 (The "Village & Pillage" Update)
      • MINECRAFT_1_15

        public static final MinecraftVersion MINECRAFT_1_15
        This constant represents Minecraft (Java Edition) Version 1.15 (The "Buzzy Bees" Update)
      • UNKNOWN

        public static final MinecraftVersion UNKNOWN
        This constant represents an exceptional state in which we were unable to identify the Minecraft Version we are using
    • Method Detail

      • values

        public static MinecraftVersion[] values​()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MinecraftVersion c : MinecraftVersion.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MinecraftVersion 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
      • matches

        public boolean matches​(String version)
        This method checks whether the given version matches with this MinecraftVersion.
        Parameters:
        version - The version to compare
        Returns:
        Whether the version matches with this one