Enum Class PackageVersion

java.lang.Object
java.lang.Enum<PackageVersion>
me.lucko.shadow.bukkit.PackageVersion
All Implemented Interfaces:
Serializable, Comparable<PackageVersion>, java.lang.constant.Constable

public enum PackageVersion extends Enum<PackageVersion>
An enumeration of CraftBukkit package versions.
  • Enum Constant Details

  • Field Details

  • Method Details

    • values

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

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

      protected @NonNull String getPackageComponent()
    • nms

      public @NonNull String nms(@NonNull String className)
      Prepends the versioned NMS prefix to the given class name
      Parameters:
      className - the name of the class
      Returns:
      the full class name
    • nmsClass

      public @NonNull Class<?> nmsClass(@NonNull String className) throws ClassNotFoundException
      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

      public @NonNull String obc(@NonNull String className)
      Prepends the versioned OBC prefix to the given class name
      Parameters:
      className - the name of the class
      Returns:
      the full class name
    • obcClass

      public @NonNull Class<?> obcClass(@NonNull String className) throws ClassNotFoundException
      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

      public boolean isBefore(@NonNull PackageVersion other)
      Gets if this version comes before the other version.
      Parameters:
      other - the other version
      Returns:
      if it comes before
    • isAfter

      public boolean isAfter(@NonNull PackageVersion other)
      Gets if this version comes after the other version.
      Parameters:
      other - the other version
      Returns:
      if it comes after
    • isBeforeOrEq

      public boolean isBeforeOrEq(@NonNull PackageVersion other)
      Gets if this version is the same as or comes before the other version.
      Parameters:
      other - the other version
      Returns:
      if it comes before or is the same
    • isAfterOrEq

      public boolean isAfterOrEq(@NonNull PackageVersion other)
      Gets if this version is the same as or comes after the other version.
      Parameters:
      other - the other version
      Returns:
      if it comes after or is the same
    • runtimeVersion

      public static @NonNull PackageVersion runtimeVersion()
      Gets the package version for the current runtime server instance.
      Returns:
      the package version of the current runtime