Version

Represents a Minecraft server version in the format major.minor.patch.

Supports comparison, range checks, and conversion to package-style strings.

Constructors

Link copied to clipboard
constructor(version: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val major: Int

The major version number (e.g. 1).

Link copied to clipboard
val minor: Int

The minor version number (e.g. 20).

Link copied to clipboard
val patch: Int

The patch version number (e.g. 4). Defaults to 0 if omitted.

Functions

Link copied to clipboard
open operator override fun compareTo(other: Version): Int
Link copied to clipboard
operator fun contains(version: Version): Boolean

Returns true if this version is greater than or equal to version.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Returns the version as a package-style string (e.g. v1_20_4).

Link copied to clipboard
open override fun toString(): String