diff options
author | Jake Potrebic <[email protected]> | 2024-05-15 16:51:18 -0700 |
---|---|---|
committer | Jake Potrebic <[email protected]> | 2024-05-15 16:51:18 -0700 |
commit | 3ad45da4bea72e8926fede6ce038dc85fbceb69d (patch) | |
tree | e50182ec698b4a9de8f366f485ee089b1901bbd9 | |
parent | 5db3a46afce7f6510526a3206568825cf035ad6e (diff) | |
download | Paper-feature/better-version.tar.gz Paper-feature/better-version.zip |
final tweaksfeature/better-version
8 files changed, 29 insertions, 20 deletions
diff --git a/patches/api/0015-Expose-server-build-information.patch b/patches/api/0015-Expose-server-build-information.patch index 6fe3fea04d..23aa937bfd 100644 --- a/patches/api/0015-Expose-server-build-information.patch +++ b/patches/api/0015-Expose-server-build-information.patch @@ -61,7 +61,7 @@ index 0000000000000000000000000000000000000000..a736d7bcdc5861a01b66ba36158db1c7 +} diff --git a/src/main/java/io/papermc/paper/ServerBuildInfo.java b/src/main/java/io/papermc/paper/ServerBuildInfo.java new file mode 100644 -index 0000000000000000000000000000000000000000..b15127bcda6e7ea892c9f07a9820b294e851a953 +index 0000000000000000000000000000000000000000..9df9d09aa477d4cd3c496ba0933c816df1ef0964 --- /dev/null +++ b/src/main/java/io/papermc/paper/ServerBuildInfo.java @@ -0,0 +1,121 @@ @@ -181,7 +181,7 @@ index 0000000000000000000000000000000000000000..b15127bcda6e7ea892c9f07a9820b294 + */ + VERSION_SIMPLE, + /** -+ * A simple version string, in format {@code <minecraftVersionId>-<buildNumber>-<gitBranch>@<gitCommit> (<buildTime>}. ++ * A simple version string, in format {@code <minecraftVersionId>-<buildNumber>-<gitBranch>@<gitCommit> (<buildTime>)}. + */ + VERSION_FULL, + } diff --git a/patches/server/0034-Expose-server-build-information.patch b/patches/server/0034-Expose-server-build-information.patch index 2232a28fdd..44620f57a0 100644 --- a/patches/server/0034-Expose-server-build-information.patch +++ b/patches/server/0034-Expose-server-build-information.patch @@ -363,10 +363,10 @@ index 0000000000000000000000000000000000000000..660b2ec6b63a4ceffee44ab11f54dfa7 +} diff --git a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java new file mode 100644 -index 0000000000000000000000000000000000000000..f0279fe33bf41ce631190ad9de365dccdb9aa329 +index 0000000000000000000000000000000000000000..790bad0494454ca12ee152e3de6da3da634d9b20 --- /dev/null +++ b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java -@@ -0,0 +1,103 @@ +@@ -0,0 +1,104 @@ +package io.papermc.paper; + +import com.google.common.base.Strings; @@ -379,6 +379,7 @@ index 0000000000000000000000000000000000000000..f0279fe33bf41ce631190ad9de365dcc +import net.kyori.adventure.key.Key; +import net.minecraft.SharedConstants; +import org.bukkit.craftbukkit.CraftServer; ++import org.bukkit.craftbukkit.Main; +import org.jetbrains.annotations.NotNull; + +public record ServerBuildInfoImpl( @@ -421,7 +422,7 @@ index 0000000000000000000000000000000000000000..f0279fe33bf41ce631190ad9de365dcc + .orElse(OptionalInt.empty()), + getManifestAttribute(manifest, ATTRIBUTE_BUILD_TIME) + .map(Instant::parse) -+ .orElseGet(Instant::now), ++ .orElse(Main.BOOT_TIME), + getManifestAttribute(manifest, ATTRIBUTE_GIT_BRANCH), + getManifestAttribute(manifest, ATTRIBUTE_GIT_COMMIT) + ); @@ -597,10 +598,18 @@ index b32ae5b9c232e5d9b3bd89303db3d2cc6258ea29..4d31fb8bc8bf285720a9d5828325d712 public List<CraftPlayer> getOnlinePlayers() { return this.playerView; diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index bc664b090e16ed27ba795c204dc5639679e6eee8..3c4a593cfbc111084abc971bc7532898d094bd9a 100644 +index bc664b090e16ed27ba795c204dc5639679e6eee8..9dc72b01092783c436bc1fa8ce29ff7cdaa39b19 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -252,13 +252,26 @@ public class Main { +@@ -15,6 +15,7 @@ import joptsimple.OptionSet; + import joptsimple.util.PathConverter; + + public class Main { ++ public static final java.time.Instant BOOT_TIME = java.time.Instant.now(); // Paper - track initial start time + public static boolean useJline = true; + public static boolean useConsole = true; + +@@ -252,13 +253,26 @@ public class Main { deadline.add(Calendar.DAY_OF_YEAR, -3); if (buildDate.before(deadline.getTime())) { System.err.println("*** Error, this build is outdated ***"); diff --git a/patches/server/0102-Add-server-name-parameter.patch b/patches/server/0102-Add-server-name-parameter.patch index 465d38a30d..74018176e7 100644 --- a/patches/server/0102-Add-server-name-parameter.patch +++ b/patches/server/0102-Add-server-name-parameter.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add server-name parameter diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 3c4a593cfbc111084abc971bc7532898d094bd9a..dc93fd6f89694d9ae3c05de9a9d427ecce564fc9 100644 +index 9dc72b01092783c436bc1fa8ce29ff7cdaa39b19..9515a6f72b54bc8926f10182143b2aa9b684a341 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -167,6 +167,14 @@ public class Main { +@@ -168,6 +168,14 @@ public class Main { .defaultsTo(new File[] {}) .describedAs("Jar file"); // Paper end diff --git a/patches/server/0148-Fix-this-stupid-bullshit.patch b/patches/server/0148-Fix-this-stupid-bullshit.patch index ea8050525d..bef52e1305 100644 --- a/patches/server/0148-Fix-this-stupid-bullshit.patch +++ b/patches/server/0148-Fix-this-stupid-bullshit.patch @@ -31,10 +31,10 @@ index 26892378d27dadce25c178333188ba093dc1617b..a3a2097716430b30c9bac2581b9f67fe Bootstrap.isBootstrapped = true; Instant instant = Instant.now(); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index dc93fd6f89694d9ae3c05de9a9d427ecce564fc9..caa7fefab037a24713e9f7f15a541d47bc7655ee 100644 +index 9515a6f72b54bc8926f10182143b2aa9b684a341..faa228698c7dd60bde0f3767cc27957ece04b8be 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -259,10 +259,12 @@ public class Main { +@@ -260,10 +260,12 @@ public class Main { Calendar deadline = Calendar.getInstance(); deadline.add(Calendar.DAY_OF_YEAR, -3); if (buildDate.before(deadline.getTime())) { diff --git a/patches/server/0320-Improve-java-version-check.patch b/patches/server/0320-Improve-java-version-check.patch index e5761ec018..df50b64ab2 100644 --- a/patches/server/0320-Improve-java-version-check.patch +++ b/patches/server/0320-Improve-java-version-check.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Improve java version check Co-Authored-By: MiniDigger <[email protected]> diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index caa7fefab037a24713e9f7f15a541d47bc7655ee..11b1e23ea2a0d4faf7e74d3c9580b7a776ac795b 100644 +index faa228698c7dd60bde0f3767cc27957ece04b8be..f3bce016e729d553aaa6185470bbf4317f94352b 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -202,23 +202,27 @@ public class Main { +@@ -203,23 +203,27 @@ public class Main { return; } diff --git a/patches/server/0356-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/patches/server/0356-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch index be25b224a2..44bd324f68 100644 --- a/patches/server/0356-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch +++ b/patches/server/0356-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch @@ -17,10 +17,10 @@ keeping long lived large direct buffers in cache. Set system properly at server startup if not set already to help protect from this. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 11b1e23ea2a0d4faf7e74d3c9580b7a776ac795b..8a0767be9974098b30e7d346ca2e4865f1f514af 100644 +index f3bce016e729d553aaa6185470bbf4317f94352b..02243b69cca7255588b43dab57e1c9ca4c3ca87f 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -26,6 +26,7 @@ public class Main { +@@ -27,6 +27,7 @@ public class Main { } // Paper end // Todo: Installation script diff --git a/patches/server/0751-Fix-plugin-loggers-on-server-shutdown.patch b/patches/server/0751-Fix-plugin-loggers-on-server-shutdown.patch index 885579b358..8a41141be3 100644 --- a/patches/server/0751-Fix-plugin-loggers-on-server-shutdown.patch +++ b/patches/server/0751-Fix-plugin-loggers-on-server-shutdown.patch @@ -49,10 +49,10 @@ index 803c234ec23147ed317ae4639438141462dfbd80..f67b48131ec7e18177f5daeda1938964 } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 8a0767be9974098b30e7d346ca2e4865f1f514af..013dbe120c9c9e9394083d4dc2f31db7c5961aa1 100644 +index 02243b69cca7255588b43dab57e1c9ca4c3ca87f..6e1f92b45504cef0c4dcbbebf3df339ef4cad0a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -18,6 +18,12 @@ public class Main { +@@ -19,6 +19,12 @@ public class Main { public static boolean useJline = true; public static boolean useConsole = true; diff --git a/patches/server/0993-Improved-Watchdog-Support.patch b/patches/server/0993-Improved-Watchdog-Support.patch index c2716d9531..3fe8cd817b 100644 --- a/patches/server/0993-Improved-Watchdog-Support.patch +++ b/patches/server/0993-Improved-Watchdog-Support.patch @@ -315,10 +315,10 @@ index 424c4613e202c6ba50fa0de65d2526d400a8e299..2a8609e33716949ff1877b6d10f64a9d final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ()); net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 013dbe120c9c9e9394083d4dc2f31db7c5961aa1..c988afa496d25314451435eedd64079a0d87cef0 100644 +index 6e1f92b45504cef0c4dcbbebf3df339ef4cad0a1..e02102280ed1dc300191d19bbca8f00e17701753 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -187,6 +187,36 @@ public class Main { +@@ -188,6 +188,36 @@ public class Main { OptionSet options = null; @@ -355,7 +355,7 @@ index 013dbe120c9c9e9394083d4dc2f31db7c5961aa1..c988afa496d25314451435eedd64079a try { options = parser.parse(args); } catch (joptsimple.OptionException ex) { -@@ -298,8 +328,65 @@ public class Main { +@@ -299,8 +329,65 @@ public class Main { } catch (Throwable t) { t.printStackTrace(); } |