From 1ffe9c3d126037ba83bcd9cc876138628f9ab0b8 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Thu, 3 Mar 2022 19:25:13 +1300 Subject: [PATCH] Attempt to fix an error with weirdly named plugin folders --- .../me/libraryaddict/disguise/utilities/LibsPremium.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugin/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java b/plugin/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java index 8d23d774..13e42a5c 100644 --- a/plugin/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java +++ b/plugin/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java @@ -149,7 +149,13 @@ public class LibsPremium { } private static void doSecondaryCheck(String version) { - File[] files = new File("plugins/LibsDisguises/").listFiles(); + File pluginDir = new File("plugins/LibsDisguises/"); + + if (!pluginDir.exists() && LibsDisguises.getInstance() != null) { + pluginDir = LibsDisguises.getInstance().getDataFolder(); + } + + File[] files = pluginDir.listFiles(); boolean foundJar = false; if (files == null) {