Skip to content

Commit

Permalink
Fixed most issues with 1.20.4+ (still wont compile but will run on th…
Browse files Browse the repository at this point in the history
…e platform)
  • Loading branch information
mosemister committed Jun 11, 2024
1 parent c35cbde commit 01d9653
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,38 @@ public int getPatch() {
return this.patch;
}

public boolean isGreater(int major) {
return this.isGreater(major, null, null);
}

public boolean isGreater(int major, int minor) {
return this.isGreater(major, minor, null);
}

public boolean isGreater(int major, @Nullable Integer minor, @Nullable Integer patch) {
if (major > this.major) {
return true;
}
if (major < this.major) {
return false;
}
if (minor != null) {
if (minor > this.minor) {
return true;
}
if (minor < this.minor) {
return false;
}
}
if (patch == null) {
return true;
}
if (patch > this.patch) {
return true;
}
return !(patch < this.patch);
}

@Override
public @NotNull String asString() {
String versionName = this.versionName;
Expand Down

0 comments on commit 01d9653

Please sign in to comment.