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,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) | ||||||
|  | 				{ } | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user