First Parse
First Parse
Section titled “First Parse”Use DaisySeries when config-like input needs to become real Bukkit values without a pile of plugin-local helpers.
This is the exact kind of plugin data DaisySeries is meant for:
- config strings
- admin-editable YAML
- loadout/setup files
- text values that later become real Bukkit or Paper types
val icon = DaisyMaterials.parse("diamond sword")val sound = DaisySounds.parse("entity player levelup")val flags = DaisyItemFlags.parseMany(listOf("hide enchants", "hide attributes"))val enchantment = DaisyEnchantments.parse("sharpness")val effect = DaisyPotions.parse("slow falling")val biome = DaisyBiomes.parse("cherry grove")val profession = DaisyVillagerProfessions.parse("tool smith")val attribute = DaisyAttributes.parse("attack damage")val entity = DaisyEntities.parse("zombie villager")val gameMode = DaisyGameModes.parse("surv")val difficulty = DaisyDifficulties.parse("hard")val facing = DaisyBlockFaces.parse("north-east")val damageCause = DaisyDamageCauses.parse("entity attack")val operation = DaisyOperations.parse("multiply scalar 1")val pattern = DaisyPatternTypes.parse("straight cross")val particle = DaisyParticles.parse("totem")val statistic = DaisyStatistics.parse("player kills")
logger.info("Icon: ${DaisyMaterials.displayName(icon)} (${DaisyMaterials.key(icon)})")logger.info("Sound: ${DaisySounds.displayName(sound)}")logger.info("Flags: ${flags.joinToString { DaisyItemFlags.displayName(it) }}")logger.info("Enchant: ${DaisyEnchantments.displayName(enchantment)}")logger.info("Effect: ${DaisyPotions.displayName(effect)}")logger.info("Profession: ${DaisyVillagerProfessions.displayName(profession)}")logger.info("Attribute: ${DaisyAttributes.displayName(attribute)}")logger.info("Damage cause: ${DaisyDamageCauses.displayName(damageCause)}")logger.info("Operation: ${DaisyOperations.displayName(operation)}")logger.info("Pattern: ${DaisyPatternTypes.displayName(pattern)}")What you get
Section titled “What you get”- strict
parse(...) - nullable
parseOrNull(...) - canonical
key(...) - UI-friendly
displayName(...) - curated
aliases(...)
Why this matters
Section titled “Why this matters”The goal is not just parsing. The goal is replacing all the repetitive plugin-local helpers like:
Material.valueOf(...)wrappers- lowercase normalization
- kebab-case handling
- ad hoc alias maps
- hand-written display-name formatting
- scattered serialization key logic
Next steps
Section titled “Next steps”- Learn the modules: Materials, Sounds, Item Flags, Enchantments, Potions, Biomes, Villager Professions, Attributes, Entity Types, Game Modes, Difficulties, Block Faces, Damage Causes, Operations, Pattern Types, Particles, and Statistics
- Pair it with runtime systems: Use DaisySeries with DaisyCore