From 989afe3d315994d3eea9a6ce3c29a4f10d3b0d3f Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Thu, 7 Mar 2019 14:39:10 +1300 Subject: [PATCH] Compare numbers not strings --- .../me/libraryaddict/disguise/utilities/LibsPremium.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java b/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java index 981e9d02..1192ddef 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java @@ -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 {