mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 14:33:09 +01:00
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.
This commit is contained in:
parent
f501069d24
commit
0e9230e80c
1 changed files with 3 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue