Class MinecraftVersionUtil
java.lang.Object
net.guizhanss.guizhanlib.minecraft.utils.MinecraftVersionUtil
Utility methods about Minecraft versions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisAtLeast(int minor) Check if the sever's current minecraft version is at least the specified version.static booleanisAtLeast(int minor, int patch) Check if the sever's current minecraft version is at least the specified version.static booleanisBefore(int minor) Check if the sever's current minecraft version is before the specified version (exclusive).static booleanisBefore(int minor, int patch) Check if the sever's current minecraft version is before the specified version (exclusive).
-
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.
-