Fix # not being caught in build no

This commit is contained in:
libraryaddict 2020-04-19 08:55:54 +12:00
parent e29ad3ffde
commit 843d955521
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4

View File

@ -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;