mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-02-11 03:30:02 +00:00
Compare numbers not strings
This commit is contained in:
parent
d164ea36dc
commit
989afe3d31
1 changed files with 3 additions and 3 deletions
|
@ -112,12 +112,12 @@ public class LibsPremium {
|
|||
}
|
||||
|
||||
// Split by decimal points
|
||||
String[] cSplit = currentVersion.split("\\.");
|
||||
String[] nSplit = premiumVersion.split("\\.");
|
||||
String[] currentSplit = currentVersion.split("\\.");
|
||||
String[] premSplit = premiumVersion.split("\\.");
|
||||
|
||||
// Comparing major versions
|
||||
// Current version must be the same, or lower than premium version
|
||||
return cSplit[0].compareTo(nSplit[0]) <= 0;
|
||||
return Integer.parseInt(currentSplit[0]) <= Integer.parseInt(premSplit[0]);
|
||||
}
|
||||
|
||||
private static PluginInformation getInformation(File file) throws Exception {
|
||||
|
|
Loading…
Reference in a new issue