Updated Upstream (Bukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
b94b766f Improve /version command
This commit is contained in:
Shane Freeder 2021-01-16 02:46:43 +00:00
parent d3dc24999e
commit ce979b29be
2 changed files with 9 additions and 10 deletions

View File

@ -72,7 +72,7 @@ index 945b8b030d1b2a13afc0c4efad76997eb7bf00ba..1b6d737046646c102b0d519ab3f67c3f
// Paper end // Paper end
} }
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
index abbd1c35f9ac55ea61e94dd19d44c82628d1cb99..a47ed6b290c051ff076900028b929745aac0ba55 100644 index 2305eb40832a82159cd89162934870cf57e1aa0e..c1f64d31835bd9cd86f807c77cdb86190f4709b0 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java --- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java +++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -120,21 +120,20 @@ index abbd1c35f9ac55ea61e94dd19d44c82628d1cb99..a47ed6b290c051ff076900028b929745
return; return;
} }
versionWaiters.add(sender); versionWaiters.add(sender);
@@ -186,7 +196,12 @@ public class VersionCommand extends BukkitCommand { @@ -186,6 +196,12 @@ public class VersionCommand extends BukkitCommand {
private void obtainVersion() { private void obtainVersion() {
String version = Bukkit.getVersion(); String version = Bukkit.getVersion();
- if (version == null) version = "Custom";
+ // Paper start + // Paper start
+ if (version.startsWith("null")) { // running from ide? + if (version.startsWith("null")) { // running from ide?
+ setVersionMessage("Unknown version, custom build?"); + setVersionMessage("Unknown version, custom build?");
+ return; + return;
+ } + }
+ /* + /*
if (version.startsWith("git-Spigot-")) { if (version == null) version = "Custom";
String[] parts = version.substring("git-Spigot-".length()).split("-"); String[] parts = version.substring(0, version.indexOf(' ')).split("-");
int cbVersions = getDistance("craftbukkit", parts[1].substring(0, parts[1].indexOf(' '))); if (parts.length == 4) {
@@ -216,6 +231,9 @@ public class VersionCommand extends BukkitCommand { @@ -215,6 +231,9 @@ public class VersionCommand extends BukkitCommand {
} else { } else {
setVersionMessage("Unknown version, custom build?"); setVersionMessage("Unknown version, custom build?");
} }
@ -144,7 +143,7 @@ index abbd1c35f9ac55ea61e94dd19d44c82628d1cb99..a47ed6b290c051ff076900028b929745
} }
private void setVersionMessage(@NotNull String msg) { private void setVersionMessage(@NotNull String msg) {
@@ -225,8 +243,13 @@ public class VersionCommand extends BukkitCommand { @@ -224,8 +243,13 @@ public class VersionCommand extends BukkitCommand {
try { try {
hasVersion = true; hasVersion = true;
versionTaskStarted = false; versionTaskStarted = false;
@ -159,7 +158,7 @@ index abbd1c35f9ac55ea61e94dd19d44c82628d1cb99..a47ed6b290c051ff076900028b929745
} }
versionWaiters.clear(); versionWaiters.clear();
} finally { } finally {
@@ -234,6 +257,15 @@ public class VersionCommand extends BukkitCommand { @@ -233,6 +257,15 @@ public class VersionCommand extends BukkitCommand {
} }
} }

@ -1 +1 @@
Subproject commit 85b16b8a5f044eb8d38375c23e8968641d18a933 Subproject commit b94b766f2285a5b55720a8aa72605e2e64b0330a