Package net.paulem.arcana.utils
Class Versioning
java.lang.Object
net.paulem.arcana.utils.Versioning
Utility methods for detecting the running server's Minecraft version and server software.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisPaper()Checks whether the server is running Paper (or a fork of it), by testing for the presence of a Paper-specific class on the classpath.static booleanisPost(int v) Checks whether the running server's Minecraft minor version is at leastv.1(i.e. strictly after minor versionv, or minor versionvwith a patch of 1 or higher).static booleanisPost(int v, int r) Checks whether the running server's Minecraft version is strictly afterv.r.
-
Constructor Details
-
Versioning
public Versioning()
-
-
Method Details
-
isPost
public static boolean isPost(int v) Checks whether the running server's Minecraft minor version is at leastv.1(i.e. strictly after minor versionv, or minor versionvwith a patch of 1 or higher).- Parameters:
v- the minor version to compare against- Returns:
trueif the server's Minecraft version is at or afterv.1
-
isPost
public static boolean isPost(int v, int r) Checks whether the running server's Minecraft version is strictly afterv.r.- Parameters:
v- the minor version to compare againstr- the patch version to compare against- Returns:
trueif the server's Minecraft version is strictly afterv.r
-
isPaper
public static boolean isPaper()Checks whether the server is running Paper (or a fork of it), by testing for the presence of a Paper-specific class on the classpath.- Returns:
trueif the server is running Paper or a Paper fork,falseotherwise
-