Class ServerVersion

java.lang.Object
de.eldoria.eldoutilities.crossversion.ServerVersion

public final class ServerVersion extends Object
Enum to determine and work with multiple versions.
Since:
1.0.0
  • Field Details

    • MC_UNKOWN

      public static final Version MC_UNKOWN
    • CURRENT_VERSION

      public static final Version CURRENT_VERSION
      Contains the current version of the server.
  • Constructor Details

    • ServerVersion

      public ServerVersion()
  • Method Details

    • getVersion

      public static Version getVersion()
      Get the version of the server.
      Returns:
      version of server
    • forceVersion

      public static void forceVersion(Version oldest, Version newest)
      This method will check if the current version is between the oldest and newest version. Will abort enable of plugin when called on enable.
      Parameters:
      oldest - oldest version (inclusive)
      newest - newest version (inclusive)
      Throws:
      UnsupportedVersionException - when the server version is not between the oldest and newest version.