mirror of
				https://github.com/PlaceholderAPI/PlaceholderAPI
				synced 2025-10-31 06:12:28 +01:00 
			
		
		
		
	updated fileutil to ignore NCDFEs, and to print exceptions
This commit is contained in:
		| @@ -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,12 +92,17 @@ public class FileUtil | |||||||
| 					continue; | 					continue; | ||||||
| 				} | 				} | ||||||
|  |  | ||||||
|  | 				try | ||||||
|  | 				{ | ||||||
| 					final Class<?> loaded = loader.loadClass(name.substring(0, name.lastIndexOf('.')).replace('/', '.')); | 					final Class<?> loaded = loader.loadClass(name.substring(0, name.lastIndexOf('.')).replace('/', '.')); | ||||||
| 					if (clazz.isAssignableFrom(loaded)) | 					if (clazz.isAssignableFrom(loaded)) | ||||||
| 					{ | 					{ | ||||||
| 						list.add(loaded.asSubclass(clazz)); | 						list.add(loaded.asSubclass(clazz)); | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
|  | 				catch (final NoClassDefFoundError ignored) | ||||||
|  | 				{ } | ||||||
|  | 			} | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user