Package com.nexomc.nexo.utils
Class MinecraftVersion
-
- All Implemented Interfaces:
-
java.io.Serializable,kotlin.Comparable
public final class MinecraftVersion implements Comparable<MinecraftVersion>, Serializable
Determine the current Minecraft version.
Kristian
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classMinecraftVersion.Companion
-
Constructor Summary
Constructors Constructor Description MinecraftVersion(String versionOnly)Construct a version format from the standard release version or the snapshot verison. MinecraftVersion(Integer major, Integer minor, Integer build)
-
Method Summary
Modifier and Type Method Description final IntegergetMajor()Major version number final IntegergetMinor()Minor version number final IntegergetBuild()Build version number final StringgetVersion()final BooleanatOrAbove()Checks if this version is at or above the current version the server is running. IntegercompareTo(MinecraftVersion other)final BooleanisAtLeast(MinecraftVersion other)Booleanequals(Object other)IntegerhashCode()StringtoString()-
-
Method Detail
-
getVersion
final String getVersion()
-
atOrAbove
final Boolean atOrAbove()
Checks if this version is at or above the current version the server is running.
- Returns:
true if this version is equal or newer than the server version, false otherwise.
-
compareTo
Integer compareTo(MinecraftVersion other)
-
isAtLeast
final Boolean isAtLeast(MinecraftVersion other)
-
-
-
-