public final class ServerVersions
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static int |
getJavaVersion()
Returns the JRE version (Java version) that the server is running.
|
static boolean |
isFolia()
Returns
true if the server is running a version of Folia, or any fork of Folia. |
static boolean |
isPaper()
Returns
true if the server is running a version of Paper, or any fork of Paper. |
public static boolean isPaper()
true if the server is running a version of Paper, or any fork of Paper.public static boolean isFolia()
true if the server is running a version of Folia, or any fork of Folia.
Note that when isFolia returns true, isPaper will also return true, since
Folia is a fork of Paper.
public static int getJavaVersion()
This method only returns the "major" component of the Java version. For example, if the server is running Java 11.0.1, this method will return 11. If the server is running Java 1.8.0_191, this method will return 8.