Class MinecraftVersionUtil

java.lang.Object
net.guizhanss.guizhanlib.minecraft.utils.MinecraftVersionUtil

public class MinecraftVersionUtil extends Object
Utility methods about Minecraft versions.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isAtLeast(int minor)
    Check if the sever's current minecraft version is at least the specified version.
    static boolean
    isAtLeast(int minor, int patch)
    Check if the sever's current minecraft version is at least the specified version.
    static boolean
    isBefore(int minor)
    Check if the sever's current minecraft version is before the specified version (exclusive).
    static boolean
    isBefore(int minor, int patch)
    Check if the sever's current minecraft version is before the specified version (exclusive).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MinecraftVersionUtil

      public MinecraftVersionUtil()
  • Method Details

    • isAtLeast

      public static boolean isAtLeast(int minor, int patch)
      Check if the sever's current minecraft version is at least the specified version.
      Parameters:
      minor - The minor version. (actually major)
      patch - The patch version.
      Returns:
      Whether the server's current version is at least the specified version.
    • isAtLeast

      public static boolean isAtLeast(int minor)
      Check if the sever's current minecraft version is at least the specified version.
      Parameters:
      minor - The minor version. (actually major)
      Returns:
      Whether the server's current version is at least the specified version.
    • isBefore

      public static boolean isBefore(int minor, int patch)
      Check if the sever's current minecraft version is before the specified version (exclusive).
      Parameters:
      minor - The minor version. (actually major)
      patch - The patch version.
      Returns:
      Whether the server's current version is before the specified version.
    • isBefore

      public static boolean isBefore(int minor)
      Check if the sever's current minecraft version is before the specified version (exclusive).
      Parameters:
      minor - The minor version. (actually major)
      Returns:
      Whether the server's current version is before the specified version.