mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 08:14:00 +02:00
make Version work with experimental 26.1 paper build
This commit is contained in:
parent
cff94a2c5a
commit
f82ccfa07e
1 changed files with 5 additions and 1 deletions
|
|
@ -21,7 +21,11 @@ public record Version(int major, int minor, int patch) {
|
|||
int[] versionParts = new int[]{0, 0, 0};
|
||||
|
||||
for (int i = 0; i < Math.min(3, partialVersion.length); i++) {
|
||||
try {
|
||||
versionParts[i] = Integer.parseInt(partialVersion[i]);
|
||||
} catch (NumberFormatException e) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return new Version(versionParts[0], versionParts[1], versionParts[2]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue