Class BukkitServer

java.lang.Object
ml.karmaconfigs.api.bukkit.server.BukkitServer

public final class BukkitServer extends Object
Minecraft bukkit server version utils. Check versions and more...
  • Constructor Details

    • BukkitServer

      public BukkitServer()
  • Method Details

    • getRealVersion

      public static String getRealVersion()
      Get the full version string of the server
      Returns:
      a String
    • getFullVersion

      public static String getFullVersion()
      Get the version full version as string
      Returns:
      a String
    • getPackageType

      public static String getPackageType()
      Get the server version package type
      Returns:
      a string
    • getPackageBuild

      public static String getPackageBuild()
      Get the server version package build
      Returns:
      a string
    • getVersion

      public static float getVersion()
      Get the server version
      Returns:
      a float
    • getVersionUpdate

      public static int getVersionUpdate()
      Get the server version update (Example: 1.16.2 will return "2")
      Returns:
      an integer
    • version

      public static Version version()
      Get the version in enumeration type
      Returns:
      a Version instance
    • isOver

      public static boolean isOver(Version version)
      Check if the current server version is over the specified one
      Parameters:
      version - the check version
      Returns:
      if current version is over the specified one
    • isUpdated

      public static boolean isUpdated(Version version)
      Check if the current server version is the specified one
      Parameters:
      version - the check version
      Returns:
      if the current version is the specified one
    • isUnder

      public static boolean isUnder(Version v)
      Check if the current server version is under the specified one
      Parameters:
      v - the server version
      Returns:
      if current version is over the specified one
    • getMinecraftClass

      @Nullable public static @Nullable Class<?> getMinecraftClass(@NotNull @NotNull String clazz)
      Get a nms class directly from the server version
      Parameters:
      clazz - the class name
      Returns:
      a Class
    • getBukkitClass

      @Nullable public static @Nullable Class<?> getBukkitClass(@NotNull @NotNull String clazz)
      Get an obc class directly from server package
      Parameters:
      clazz - the class name
      Returns:
      a Class