Class VersionUtil

java.lang.Object
wbs.utils.util.VersionUtil

public final class VersionUtil extends Object
Utilities related to Minecraft server and client versions. Useful for ensuring functionality will work in a given version of the server, but also hooks into ViaVersion when installed to make client-related info available without requiring a hook in the implementing plugin.
  • Method Details

    • getVersion

      public static double getVersion()
      Get the server version as a double.
      Returns:
      A double representing the server version, where the whole part is the major version, and the decimal part is the minor release. 1.16.4 is represented as 16.4.
    • getReadableVersion

      public static String getReadableVersion(org.bukkit.entity.Player player)
    • getVersion

      public static double getVersion(org.bukkit.entity.Player player)