mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2025-02-06 04:05:28 +01:00
Empty jar check???? sure why not
This commit is contained in:
parent
f1de7d058a
commit
d072c14843
@ -45,6 +45,9 @@ public class FileUtil {
|
||||
|
||||
JarFile jar = new JarFile(file);
|
||||
Enumeration<? extends ZipEntry> entries = jar.entries();
|
||||
if (!entries.hasMoreElements()) {
|
||||
return null;
|
||||
}
|
||||
List<Class<? extends T>> classes = new ArrayList<>();
|
||||
try (URLClassLoader loader =
|
||||
new URLClassLoader(new URL[] {file.toURI().toURL()}, clazz.getClassLoader())) {
|
||||
|
Loading…
Reference in New Issue
Block a user