mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2025-02-05 15:55:28 +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;
|
return list;
|
||||||
}
|
}
|
||||||
catch (Throwable t)
|
catch (final Throwable ex)
|
||||||
{
|
{
|
||||||
// THIS SHOULD NOT BE EATEN LIKE THIS.
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
@ -92,11 +92,16 @@ public class FileUtil
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Class<?> loaded = loader.loadClass(name.substring(0, name.lastIndexOf('.')).replace('/', '.'));
|
try
|
||||||
if (clazz.isAssignableFrom(loaded))
|
|
||||||
{
|
{
|
||||||
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