Package org.spongepowered.api
Interface MinecraftVersion
-
- All Superinterfaces:
Comparable<MinecraftVersion>
public interface MinecraftVersion extends Comparable<MinecraftVersion>
Represents a specific Minecraft version of a client or a server.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OptionalInt
dataVersion()
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
.String
name()
Gets the name of this Minecraft version.-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
name
String name()
Gets the name of this Minecraft version.Note: The returned name does not necessarily represent the name of a Minecraft version. Depending on the client and implementation, this may also just return a numeric value.
- Returns:
- The version name
-
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.For Vanilla, this returns
true
for all clients older than 1.7.- Returns:
True
if this version is a legacy version
-
dataVersion
OptionalInt dataVersion()
Gets the data version of this Minecraft version.Note: The data version will not be available in a status response.
- Returns:
- The data version
-
-