Repository: mockbukkit/mockbukkit
Issue: Value of `getBukkitVersion()` is nonstandard

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Are you using the latest version of MockBukkit?

- [X] I am using the latest version of MockBukkit.

### Minecraft Version

1.19

### Describe the bug

The value of `Bukkit.getBukkitVersion()` does not conform to the expected format containing a revision number and a snapshot qualifier.

### Reproducible Test

Compile this MWE using your tool of choice:

```java
package net.ssterling.example;

import org.bukkit.Bukkit;
import be.seeseemelk.mockbukkit.MockBukkit;
import be.seeseemelk.mockbukkit.ServerMock;

class ServerVersionTest
{
	public static void main(String[] args)
	{
		ServerMock server = MockBukkit.mock();
		String version_string = Bukkit.getBukkitVersion();
		System.out.println("Bukkit API version: " + version_string);
		MockBukkit.unmock();
	}
}
```

The output is `1.19`, not the expected `1.19-R0.1-SNAPSHOT`.

### Anything else?

I’m currently working on a utility to more easily process Bukkit API and vanilla Minecraft version strings.
I’m using MockBukkit for unit tests; one of those tests makes sure the value of `Bukkit.getBukkitVersion()` is correctly detected as a valid Bukkit API server string, making sure I didn’t accidentally screw up the regex.
You can see why the “server” itself providing an incorrect string is a problem for me.

I’d provide a link to the source for the project in question for context, but it’s still a pre-0.1.0 WIP.

Changed files:
src/test/java/be/seeseemelk/mockbukkit/ServerMockTest.java, src/test/java/be/seeseemelk/mockbukkit/UnsafeValuesTest.java, src/main/java/be/seeseemelk/mockbukkit/ServerMock.java

diff --git a/src/main/java/be/seeseemelk/mockbukkit/ServerMock.java b/src/main/java/be/seeseemelk/mockbukkit/ServerMock.java
index 5ae359da..93d89bd6 100644
--- a/src/main/java/be/seeseemelk/mockbukkit/ServerMock.java
+++ b/src/main/java/be/seeseemelk/mockbukkit/ServerMock.java
@@ -486,18 +486,16 @@ public class ServerMock extends Server.Spigot implements Server
 	@Override
 	public @NotNull String getBukkitVersion()
 	{
-		return getMinecraftVersion();
+		Preconditions.checkNotNull(this.buildProperties, "Failed to load build properties!");
+		String apiVersion = buildProperties.getProperty("full-api-version");
+		Preconditions.checkNotNull(apiVersion, "Failed to get full-api-version from the build properties!");
+		return apiVersion;
 	}
 
 	@Override
 	public @NotNull String getMinecraftVersion()
 	{
-		String apiVersion;
-		if (buildProperties == null || (apiVersion = buildProperties.getProperty("full-api-version")) == null)
-		{
-			throw new IllegalStateException("Minecraft version could not be determined");
-		}
-		return apiVersion.split("-")[0];
+		return this.getBukkitVersion().split("-")[0];
 	}
 
 	@Override
diff --git a/src/test/java/be/seeseemelk/mockbukkit/ServerMockTest.java b/src/test/java/be/seeseemelk/mockbukkit/ServerMockTest.java
index 56e4240f..b7222b1a 100644
--- a/src/test/java/be/seeseemelk/mockbukkit/ServerMockTest.java
+++ b/src/test/java/be/seeseemelk/mockbukkit/ServerMockTest.java
@@ -183,6 +183,24 @@ class ServerMockTest
 		assertNotNull(server.getBukkitVersion());
 	}
 
+	@Test
+	void getBukkitVersion_CorrectPattern()
+	{
+		assertTrue(server.getBukkitVersion().matches("1\\\\.[0-9]+(\\\\.[0-9]+)?-.*SNAPSHOT.*"));
+	}
+
+	@Test
+	void getMinecraftVersion_NotNull()
+	{
+		assertNotNull(server.getMinecraftVersion());
+	}
+
+	@Test
+	void getMinecraftVersion_CorrectPattern()
+	{
+		assertTrue(server.getMinecraftVersion().matches("1\\\\.[0-9]+(\\\\.[0-9]+)?"));
+	}
+
 	@Test
 	void getName_NotNull()
 	{
diff --git a/src/test/java/be/seeseemelk/mockbukkit/UnsafeValuesTest.java b/src/test/java/be/seeseemelk/mockbukkit/UnsafeValuesTest.java
index 4c472bd9..6d097ea0 100644
--- a/src/test/java/be/seeseemelk/mockbukkit/UnsafeValuesTest.java
+++ b/src/test/java/be/seeseemelk/mockbukkit/UnsafeValuesTest.java
@@ -51,9 +51,9 @@ class UnsafeValuesTest
 	}
 
 	@Test
-	void checkSupported_currentServerVersion() throws InvalidPluginException
+	void checkSupported_currentServerVersion()
 	{
-		String currentVersion = server.getBukkitVersion();
+		String currentVersion = server.getMinecraftVersion();
 		// if version is in pattern MAJOR.MINOR.FIX, transform to MAJOR.MINOR
 		if (Pattern.matches(".{1,3}\\\\..{1,3}\\\\..*", currentVersion))
 		{