summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/command/defaults/VersionCommand.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
index 70629468..b55abdbf 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -187,7 +187,7 @@ public class VersionCommand extends BukkitCommand {
if (version == null) version = "Custom";
if (version.startsWith("git-Spigot-")) {
String[] parts = version.substring("git-Spigot-".length()).split("-");
- int cbVersions = getDistance("craftbukkit", parts[1]);
+ int cbVersions = getDistance("craftbukkit", parts[1].substring(0, parts[1].indexOf(' ')));
int spigotVersions = getDistance("spigot", parts[0]);
if (cbVersions == -1 || spigotVersions == -1) {
setVersionMessage("Error obtaining version information");
@@ -200,7 +200,8 @@ public class VersionCommand extends BukkitCommand {
}
} else if (version.startsWith("git-Bukkit-")) {
- int cbVersions = getDistance("craftbukkit", version.substring("git-Bukkit-".length()));
+ version = version.substring("git-Bukkit-".length());
+ int cbVersions = getDistance("craftbukkit", version.substring(0, version.indexOf(' ')));
if (cbVersions == -1) {
setVersionMessage("Error obtaining version information");
} else {