mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-29 13:36:16 +01:00
Handle invalid version numbers
This commit is contained in:
parent
4124c3454e
commit
2a247595c8
@ -77,8 +77,12 @@ public class UpdateUtil {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Version current = new Version(ViaVersion.getInstance().getVersion());
|
||||
Version current;
|
||||
try {
|
||||
current = new Version(ViaVersion.getInstance().getVersion());
|
||||
} catch (IllegalArgumentException e) {
|
||||
return "You are using a debug/custom version, consider updating.";
|
||||
}
|
||||
Version newest = new Version(newestString);
|
||||
if (current.compareTo(newest) < 0)
|
||||
return "There is a newer version available: " + newest.toString();
|
||||
|
Loading…
Reference in New Issue
Block a user