From 843d955521875db95a2a8e5bc94e24f7918f1502 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 19 Apr 2020 08:55:54 +1200 Subject: [PATCH] Fix # not being caught in build no --- .../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 53396244..956ee496 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java @@ -325,12 +325,12 @@ public class LibsPremium { try { PluginInformation info = getInformation(f); - if (info.getBuildNumber() == null || !info.getBuildNumber().matches("[0-9]+")) { + if (info.getBuildNumber() == null || !info.getBuildNumber().matches("#[0-9]+")) { f.delete(); DisguiseUtilities.getLogger().info("Ew, I don't recognize " + f.getName()); continue; - } else if (Integer.parseInt(info.getBuildNumber()) < - Integer.parseInt(LibsDisguises.getInstance().getBuildNo())) { + } else if (Integer.parseInt(info.getBuildNumber().replace("#", "")) < + Integer.parseInt(LibsDisguises.getInstance().getBuildNo().replace("#", ""))) { f.delete(); DisguiseUtilities.getLogger().info("Ew, " + f.getName() + " is so old"); continue;