aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0015-Expose-server-build-information.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0015-Expose-server-build-information.patch')
-rw-r--r--patches/api/0015-Expose-server-build-information.patch16
1 files changed, 9 insertions, 7 deletions
diff --git a/patches/api/0015-Expose-server-build-information.patch b/patches/api/0015-Expose-server-build-information.patch
index f0299bf5fe..3f8bdaf317 100644
--- a/patches/api/0015-Expose-server-build-information.patch
+++ b/patches/api/0015-Expose-server-build-information.patch
@@ -10,18 +10,21 @@ Co-authored-by: Riley Park <[email protected]>
diff --git a/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java b/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java
new file mode 100644
-index 0000000000000000000000000000000000000000..a736d7bcdc5861a01b66ba36158db1c716339346
+index 0000000000000000000000000000000000000000..023cc52a9e28e1238c7452c0f3f577f2850fd861
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java
-@@ -0,0 +1,45 @@
+@@ -0,0 +1,47 @@
+package com.destroystokyo.paper.util;
+
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.bukkit.Bukkit;
-+import org.jetbrains.annotations.NotNull;
++import org.jetbrains.annotations.ApiStatus;
++import org.jspecify.annotations.NullMarked;
+
++@NullMarked
+public interface VersionFetcher {
++
+ /**
+ * Amount of time to cache results for in milliseconds
+ * <p>
@@ -39,9 +42,9 @@ index 0000000000000000000000000000000000000000..a736d7bcdc5861a01b66ba36158db1c7
+ * @param serverVersion the current version of the server (will match {@link Bukkit#getVersion()})
+ * @return the message to show when requesting a version
+ */
-+ @NotNull
-+ Component getVersionMessage(@NotNull String serverVersion);
++ Component getVersionMessage(String serverVersion);
+
++ @ApiStatus.Internal
+ class DummyVersionFetcher implements VersionFetcher {
+
+ @Override
@@ -49,9 +52,8 @@ index 0000000000000000000000000000000000000000..a736d7bcdc5861a01b66ba36158db1c7
+ return -1;
+ }
+
-+ @NotNull
+ @Override
-+ public Component getVersionMessage(@NotNull String serverVersion) {
++ public Component getVersionMessage(final String serverVersion) {
+ Bukkit.getLogger().warning("Version provider has not been set, cannot check for updates!");
+ Bukkit.getLogger().info("Override the default implementation of org.bukkit.UnsafeValues#getVersionFetcher()");
+ new Throwable().printStackTrace();