diff --git a/patches/api/Add-Git-information-to-version-command-on-startup.patch b/patches/api/Add-Git-information-to-version-command-on-startup.patch index 93399d8d18..0d6b6a7d5b 100644 --- a/patches/api/Add-Git-information-to-version-command-on-startup.patch +++ b/patches/api/Add-Git-information-to-version-command-on-startup.patch @@ -73,7 +73,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + @NotNull + public static String getVersionMessage() { -+ final var manifest = JarManifests.manifest(Bukkit.getServer().getClass()); ++ final java.util.jar.Manifest manifest; ++ if (java.lang.reflect.Proxy.isProxyClass(Bukkit.getServer().getClass())) { // TestServer ++ manifest = new java.util.jar.Manifest(); ++ } else { ++ manifest = JarManifests.manifest(Bukkit.getServer().getClass()); ++ } + final String gitBranch = manifest.getMainAttributes().getValue("Git-Branch"); + final String gitCommit = manifest.getMainAttributes().getValue("Git-Commit"); + String branchMsg = " on " + gitBranch;