Class VersionModule

java.lang.Object
nl.mtvehicles.core.infrastructure.modules.VersionModule

public class VersionModule extends Object
Module containing information about the plugin and server version
  • Field Details

    • pluginVersionString

      public static String pluginVersionString
      The plugin's version as String (e.g. '2.4.2')
    • pluginVersion

      @Deprecated public static PluginVersion pluginVersion
      Deprecated.
      PluginVersion enum is no longer used, use pluginVersionString instead. (Auto-updater is no longer handled in the plugin, but on the server)
      The plugin's version as enum
      See Also:
    • isPreRelease

      public static boolean isPreRelease
      True if the plugin is a pre-release, release candidate or a dev-build
    • isDevRelease

      public static boolean isDevRelease
      True if the plugin is a dev-build (auto-updater is disabled)
    • serverSoftware

      public static String serverSoftware
      The server's software (e.g. 'Paper')
  • Constructor Details

    • VersionModule

      public VersionModule()
  • Method Details

    • getServerVersion

      public static ServerVersion getServerVersion()
      Get the server version as enum
      Returns:
      Server version
    • isSupportedVersion

      public boolean isSupportedVersion()
      Check whether the server version is supported by the plugin. Otherwise, send a warning and disable the plugin.
      Returns:
      True if the server version is supported