Getting The Category Manager
To get the category manager is fairly simple
DragonTagsAPI.category.getCategoryManager().#
It has multiple methods to get and register categories using that will also allow you to get the tags each category holds
Example Usage:
Getting all tags from all categories
Java Example
Map<String, TagCategory> categories = DragonTagsAPI.category.getCategoryManager().categories;
List<Tag> allTags = new ArrayList<>();
for (TagCategory category : categories.values()) {
allTags.addAll(category.getTags());
}
Kotlin Example
val allTags = DragonTagsAPI.category.getCategoryManager().categories.flatMap { it.value.tags }
No Comments