Interface MinecraftVersion

All Superinterfaces:
Comparable<MinecraftVersion>
All Known Subinterfaces:
ClientPingServerEvent.Response.Version

public interface MinecraftVersion extends Comparable<MinecraftVersion>
Represents a specific Minecraft version of a client or a server.
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
     
    Gets the data version of this Minecraft version.
    boolean
    Returns whether this version is an older version that doesn't support all of the features in StatusResponse.
    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 in StatusResponse. These versions are only supported for the ClientPingServerEvent, 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

      default int compareTo(MinecraftVersion o)
      Specified by:
      compareTo in interface Comparable<MinecraftVersion>