Class BukkitServer
java.lang.Object
ml.karmaconfigs.api.bukkit.server.BukkitServer
Minecraft bukkit server
version utils. Check versions
and more...
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Class<?>getBukkitClass(@NotNull String clazz)Get an obc class directly from server packagestatic StringGet the version full version as stringstatic @Nullable Class<?>getMinecraftClass(@NotNull String clazz)Get a nms class directly from the server versionstatic StringGet the server version package buildstatic StringGet the server version package typestatic StringGet the full version string of the serverstatic floatGet the server versionstatic intGet the server version update (Example: 1.16.2 will return "2")static booleanCheck if the current server version is over the specified onestatic booleanCheck if the current server version is under the specified onestatic booleanCheck if the current server version is the specified onestatic Versionversion()Get the version in enumeration type
-
Constructor Details
-
BukkitServer
public BukkitServer()
-
-
Method Details
-
getRealVersion
Get the full version string of the server- Returns:
- a String
-
getFullVersion
Get the version full version as string- Returns:
- a String
-
getPackageType
Get the server version package type- Returns:
- a string
-
getPackageBuild
Get the server version package build- Returns:
- a string
-
getVersion
public static float getVersion()Get the server version- Returns:
- a float
-
getVersionUpdate
public static int getVersionUpdate()Get the server version update (Example: 1.16.2 will return "2")- Returns:
- an integer
-
version
Get the version in enumeration type- Returns:
- a Version instance
-
isOver
Check if the current server version is over the specified one- Parameters:
version- the check version- Returns:
- if current version is over the specified one
-
isUpdated
Check if the current server version is the specified one- Parameters:
version- the check version- Returns:
- if the current version is the specified one
-
isUnder
Check if the current server version is under the specified one- Parameters:
v- the server version- Returns:
- if current version is over the specified one
-
getMinecraftClass
Get a nms class directly from the server version- Parameters:
clazz- the class name- Returns:
- a Class
-
getBukkitClass
Get an obc class directly from server package- Parameters:
clazz- the class name- Returns:
- a Class
-