Better handling custom version
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user