mirror of
				https://github.com/DanilaFe/abacus
				synced 2025-10-30 17:33:42 -07:00 
			
		
		
		
	Merge pull request #48 from DanilaFe/documentation-fix
Fix crash when a TreeValueFunction doesn't have documentation loaded.
This commit is contained in:
		
						commit
						d91536e746
					
				| @ -359,10 +359,13 @@ public class AbacusController implements PluginListener { | ||||
|             if(documentationInstance == null) | ||||
|                 documentationInstance = new Documentation(name, "", "", "", DocumentationType.FUNCTION); | ||||
|             return documentationInstance; | ||||
|         }) | ||||
|                 .collect(Collectors.toCollection(ArrayList::new))); | ||||
|         functionList.addAll(manager.getAllTreeValueFunctions().stream().map(name -> pluginManager.documentationFor(name, DocumentationType.TREE_VALUE_FUNCTION)) | ||||
|                 .collect(Collectors.toCollection(ArrayList::new))); | ||||
|         }).collect(Collectors.toCollection(ArrayList::new))); | ||||
|         functionList.addAll(manager.getAllTreeValueFunctions().stream().map(name -> { | ||||
|             Documentation documentationInstance = pluginManager.documentationFor(name, DocumentationType.TREE_VALUE_FUNCTION); | ||||
|             if(documentationInstance == null) | ||||
|                 documentationInstance = new Documentation(name, "", "", "", DocumentationType.TREE_VALUE_FUNCTION); | ||||
|             return documentationInstance; | ||||
|         }).collect(Collectors.toCollection(ArrayList::new))); | ||||
|         functionList.sort(Comparator.comparing(Documentation::getCodeName)); | ||||
|     } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user