Package org.spongepowered.api
Interface MinecraftVersion
- All Superinterfaces:
Comparable<MinecraftVersion>
- All Known Subinterfaces:
ClientPingServerEvent.Response.Version
Represents a specific Minecraft version of a client or a server.
-
Method Summary
Modifier and TypeMethodDescriptiondefault int
Gets the data version of this Minecraft version.boolean
isLegacy()
Returns whether this version is an older version that doesn't support all of the features inStatusResponse
.name()
Gets the name of this Minecraft version.int
Gets the protocol version of this Minecraft version.
-
Method Details
-
name
String name()Gets the name of this Minecraft version.- Returns:
- The version name
-
protocolVersion
int protocolVersion()Gets the protocol version of this Minecraft version.- Returns:
- The protocol version
- See Also:
-
isLegacy
boolean isLegacy()Returns whether this version is an older version that doesn't support all of the features inStatusResponse
. These versions are only supported for theClientPingServerEvent
, normally they should not be able to join the server.- Returns:
True
if this version is a legacy version
-
dataVersion
OptionalInt dataVersion()Gets the data version of this Minecraft version.- Returns:
- The data version
-
compareTo
- Specified by:
compareTo
in interfaceComparable<MinecraftVersion>
-