From 0e9230e80c18900486cc01ccd7a4b23e098cae4d Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Thu, 30 May 2019 18:31:48 -0500 Subject: [PATCH] Fix `null` display when no version history Should've been null checked since I made it nullable. String concat saved us any real damage and so all we saw was "null" shown to users. Quick check and now we don't. --- .../Add-version-history-to-version-command.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/Add-version-history-to-version-command.patch b/Spigot-Server-Patches/Add-version-history-to-version-command.patch index ff07e39a2f..6c13bff0b2 100644 --- a/Spigot-Server-Patches/Add-version-history-to-version-command.patch +++ b/Spigot-Server-Patches/Add-version-history-to-version-command.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add version history to version command diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java -index ded51d042..e0bd79f60 100644 +index ded51d042..513cddb9b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java +++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java @@ -0,0 +0,0 @@ public class PaperVersionFetcher implements VersionFetcher { @@ -14,8 +14,9 @@ index ded51d042..e0bd79f60 100644 String[] parts = serverVersion.substring("git-Paper-".length()).split("[-\\s]"); - return getUpdateStatusMessage("PaperMC/Paper", GITHUB_BRANCH_NAME, parts[0]); + String updateMessage = getUpdateStatusMessage("PaperMC/Paper", GITHUB_BRANCH_NAME, parts[0]); ++ String history = getHistory(); + -+ return getHistory() + "\n" + updateMessage; ++ return history != null ? history + "\n" + updateMessage : updateMessage; } private static @Nullable String getMinecraftVersion() {