Better handling custom version
This commit is contained in:
@@ -45,6 +45,9 @@ public class MixinVersionCommand {
|
|||||||
|
|
||||||
private volatile boolean versionObtaining;
|
private volatile boolean versionObtaining;
|
||||||
private long lastCheckMillis;
|
private long lastCheckMillis;
|
||||||
|
|
||||||
|
private CommandSender currentSender;
|
||||||
|
private boolean customVersion;
|
||||||
|
|
||||||
// The name can lead to misunderstand,
|
// 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'),
|
// this method doesn't send the whole version message (e.g. 'This server is running {} version' or 'Previous version'),
|
||||||
@@ -80,9 +83,6 @@ public class MixinVersionCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private CommandSender currentSender;
|
|
||||||
private boolean customVersion;
|
|
||||||
|
|
||||||
@Overwrite
|
@Overwrite
|
||||||
private void obtainVersion() {
|
private void obtainVersion() {
|
||||||
if (false /* TODO Option: legacy-versioning-compat */) {
|
if (false /* TODO Option: legacy-versioning-compat */) {
|
||||||
@@ -122,6 +122,7 @@ public class MixinVersionCommand {
|
|||||||
break;
|
break;
|
||||||
case -2:
|
case -2:
|
||||||
setVersionMessage("Unknown version");
|
setVersionMessage("Unknown version");
|
||||||
|
customVersion = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
setVersionMessage("You are " + distance + " version(s) behind");
|
setVersionMessage("You are " + distance + " version(s) behind");
|
||||||
|
|||||||
Reference in New Issue
Block a user