Class Versions
java.lang.Object
de.craftsblock.craftsnet.utils.versions.Versions
Utility class for handling version comparison logic in the CNet system.
This class provides methods for determining whether a version string matches
a specified comparison operator and compares it to another version.
It leverages the Comparison enum to execute the comparisons.
- Since:
- 3.1.0-SNAPSHOT
- See Also:
-
Comparison
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanDetermines whether the given current version is suitable in comparison to the expected version.static voidverbalCheck(CraftsNet craftsNet) Checks the version of CraftsNet using the repo server and displays the result in the console.
-
Method Details
-
suitable
Determines whether the given current version is suitable in comparison to the expected version.- Parameters:
current- the current version as a stringexpected- the expected version as a string, which can optionally contain a comparison operator- Returns:
trueif the current version satisfies the comparison with the expected version,falseotherwise
-
verbalCheck
Checks the version of CraftsNet using the repo server and displays the result in the console.- Parameters:
craftsNet- The currentCraftsNetinstance.
-