Revert "Fixed #1351, Try search the quickshop jar if old jar not found"

This reverts commit 5b4530f827.
This commit is contained in:
sandtechnology committed 2021-08-11 02:44:35 +08:00
1 parent 976e8e8d58
commit 7c6b1b7fcd
1 file changed
-16
@@ -676,22 +676,6 @@ public class QuickShop extends JavaPlugin {
throw new IllegalStateException("Failed to reload QuickShop! Please consider restarting the server. (Plugin was updated)");
}
}
// Maybe name changed, try search globally
if (!file.exists()) {
File pluginFolder = new File("plugins");
if (pluginFolder.isDirectory()) {
//noinspection ConstantConditions
for (File listFile : pluginFolder.listFiles()) {
if (listFile.getName().endsWith(".jar")) {
if (getPluginLoader().loadPlugin(listFile).getName().equals(getDescription().getName())) {
file = listFile;
break;
}
}
}
}
}
if (!file.exists()) {
throw new IllegalStateException("Failed to reload QuickShop! Please consider restarting the server. (Failed to find plugin jar)");
}