mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
updated fileutil to ignore NCDFEs, and to print exceptions
This commit is contained in:
parent
377d091ae2
commit
0a4150d63e
@ -71,9 +71,9 @@ public class FileUtil
|
||||
|
||||
return list;
|
||||
}
|
||||
catch (Throwable t)
|
||||
catch (final Throwable ex)
|
||||
{
|
||||
// THIS SHOULD NOT BE EATEN LIKE THIS.
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
return Collections.emptyList();
|
||||
@ -92,11 +92,16 @@ public class FileUtil
|
||||
continue;
|
||||
}
|
||||
|
||||
final Class<?> loaded = loader.loadClass(name.substring(0, name.lastIndexOf('.')).replace('/', '.'));
|
||||
if (clazz.isAssignableFrom(loaded))
|
||||
try
|
||||
{
|
||||
list.add(loaded.asSubclass(clazz));
|
||||
final Class<?> loaded = loader.loadClass(name.substring(0, name.lastIndexOf('.')).replace('/', '.'));
|
||||
if (clazz.isAssignableFrom(loaded))
|
||||
{
|
||||
list.add(loaded.asSubclass(clazz));
|
||||
}
|
||||
}
|
||||
catch (final NoClassDefFoundError ignored)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user