Class VersionUtils
java.lang.Object
me.remigio07.chatplugin.api.common.util.VersionUtils
Util class used to grab information
about the current environment's version.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents a Minecraft: Java Edition release. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGets the current environment's implementation's name.static StringGets the current environment's implementation's version.static StringGets the current environment's NMS version.static VersionUtils.VersionGets the current environment's version.static voidDeprecated.Internal use only.static booleanChecks if this is an Arclight environment.static booleanChecks if this is a FlameCord environment.static booleanisPaper()Checks if this is a Paper environment.static booleanisPurpur()Checks if this is a Purpur environment.static booleanisSpigot()Checks if this is a Spigot environment.static booleanChecks if this is a Waterfall environment.
-
Constructor Details
-
VersionUtils
public VersionUtils()
-
-
Method Details
-
initVersionUtils
Deprecated.Internal use only.Initializes this class.- Throws:
ChatPluginManagerException- If something goes wrong.
-
getVersion
Gets the current environment's version.- Returns:
- Environment's version
-
getNMSVersion
Gets the current environment's NMS version.Will return "N/A" on non-Bukkit environments and on Paper starting from 1.20.5.
- Returns:
- Environment's NMS version
-
getImplementationVersion
Gets the current environment's implementation's version.- Returns:
- Environment's implementation's version
-
getImplementationName
Gets the current environment's implementation's name.- Returns:
- Environment's implementation's name
-
isSpigot
public static boolean isSpigot()Checks if this is a Spigot environment.- Returns:
- Whether Spigot is running
-
isPaper
public static boolean isPaper()Checks if this is a Paper environment.- Returns:
- Whether Paper is running
-
isPurpur
public static boolean isPurpur()Checks if this is a Purpur environment.- Returns:
- Whether Purpur is running
-
isArclight
public static boolean isArclight()Checks if this is an Arclight environment.- Returns:
- Whether Arclight is running
-
isWaterfall
public static boolean isWaterfall()Checks if this is a Waterfall environment.- Returns:
- Whether Waterfall is running
-
isFlameCord
public static boolean isFlameCord()Checks if this is a FlameCord environment.- Returns:
- Whether FlameCord is running
-