Skip to content

Commit

Permalink
Remove color codes from mod version comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
Roadhog360 committed Oct 30, 2024
1 parent e25a52d commit 00e3f4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/ganymedes01/etfuturum/compat/ModsList.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ public String getVersion() {
}

public int compareVersion(String compareTo) {
return new ComparableVersion(getVersion()).compareTo(new ComparableVersion(compareTo));
String cleanedString = compareTo.replaceAll("§.", ""); //Remove folor code values
return new ComparableVersion(getVersion()).compareTo(new ComparableVersion(cleanedString));
}

public boolean isVersionNewer(String compareTo) {
Expand Down

0 comments on commit 00e3f4d

Please sign in to comment.