CollectionSet.java 792 B

12345678910111213141516171819202122232425
  1. package me.lortseam.completeconfig.data;
  2. import lombok.extern.log4j.Log4j2;
  3. import me.lortseam.completeconfig.api.ConfigGroup;
  4. import me.lortseam.completeconfig.data.text.TranslationIdentifier;
  5. @Log4j2
  6. public class CollectionSet extends DataSet<Collection> {
  7. protected CollectionSet(TranslationIdentifier translation) {
  8. super(translation);
  9. }
  10. void resolve(ConfigGroup group) {
  11. String groupID = group.getID();
  12. Collection collection = new Collection(groupID, translation.append(groupID), group.getTooltipTranslationKeys(), group.getComment());
  13. collection.resolve(group);
  14. if (collection.isEmpty()) {
  15. logger.warn("[CompleteConfig] Group " + groupID + " is empty");
  16. return;
  17. }
  18. add(collection);
  19. }
  20. }