Class VersionModule
java.lang.Object
nl.mtvehicles.core.infrastructure.modules.VersionModule
Module containing information about the plugin and server version
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
The correct approach to get the plugin's version (as String – e.g. '2.4.2')static ServerVersion
Get the server version as enumboolean
Check whether the server version is supported by the plugin.
-
Field Details
-
pluginVersionString
Deprecated.UsegetPluginVersion()
to access the variable. (This variable may be private in future versions.)The plugin's current version- See Also:
-
isPreRelease
public static boolean isPreReleaseTrue if the plugin is a pre-release, release candidate or a dev-build -
isDevRelease
public static boolean isDevReleaseTrue if the plugin is a dev-build (auto-updater is disabled) -
serverSoftware
The server's software (e.g. 'Paper')
-
-
Constructor Details
-
VersionModule
public VersionModule()
-
-
Method Details
-
getPluginVersion
The correct approach to get the plugin's version (as String – e.g. '2.4.2')- Since:
- 2.5.8
-
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
-
getPluginVersion()
to access the variable.