📜 Minecraft Version
There are some cases when we want to know the version of the server because we make our plugin for multiple versions Cocoabeans provides us with an easier way to do it.
We could just call ServerUtils#getVersion
MinecraftVersion myServerVersion = ServerUtils.getVersion();
Then we can check if is higher than 1.12 for example
MinecraftVersion myServerVersion = ServerUtils.getVersion();
if (myServerVersion.isHigherThanOrEqual(MinecraftVersion.V1_12_2)) {
// Do something
}
We could also get the protocol version from MinecraftVersion
int protocolVersion = ServerUtils.getVersion().protocol();
Relevant Links
Last modified: 07 July 2025