Better handling custom version

This commit is contained in:
Sotr
2018-05-29 03:03:35 +08:00
parent ab6f21addf
commit 0962227015

View File

@@ -46,6 +46,9 @@ public class MixinVersionCommand {
private volatile boolean versionObtaining;
private long lastCheckMillis;
private CommandSender currentSender;
private boolean customVersion;
// The name can lead to misunderstand,
// this method doesn't send the whole version message (e.g. 'This server is running {} version' or 'Previous version'),
// it is only responsible for checking the version distance!
@@ -80,9 +83,6 @@ public class MixinVersionCommand {
}
}
private CommandSender currentSender;
private boolean customVersion;
@Overwrite
private void obtainVersion() {
if (false /* TODO Option: legacy-versioning-compat */) {
@@ -122,6 +122,7 @@ public class MixinVersionCommand {
break;
case -2:
setVersionMessage("Unknown version");
customVersion = true;
break;
default:
setVersionMessage("You are " + distance + " version(s) behind");