mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Fix issue with manifest util in tests
This commit is contained in:
parent
7b6179345f
commit
4cf1f0d22a
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue