Class ServerVersion
java.lang.Object
de.eldoria.eldoutilities.crossversion.ServerVersion
Enum to determine and work with multiple versions.
- Since:
- 1.0.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidforceVersion(Version oldest, Version newest) This method will check if the current version is between the oldest and newest version.static VersionGet the version of the server.
-
Field Details
-
MC_UNKOWN
-
CURRENT_VERSION
Contains the current version of the server.
-
-
Constructor Details
-
ServerVersion
public ServerVersion()
-
-
Method Details
-
getVersion
Get the version of the server.- Returns:
- version of server
-
forceVersion
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.
-