OkaeriPoland / okaeri-configs

Simple Java/POJO config library written with love and Lombok
MIT License
83 stars 11 forks source link

Itemstack serializer do not serialize a color #35

Closed Ravis96 closed 2 years ago

Ravis96 commented 2 years ago

serdes-bukkit do not implement color from eg: LeatherArmorMeta.class.

dasavick commented 2 years ago

It's by design. This is also true for any other custom meta. ItemStackSerializer at the moment is relatively simple. For greatly improved compatibility, it is possible to enable a failsafe mode based on ItemStackTransformer. Keep in mind, the mode is intended for persistence use and not human-readable configs.

registry.register(new SerdesBukkit());
registry.registerExclusive(ItemStack.class, new ItemStackSerializer(true));

It was already planned to extend okaeri-configs with custom meta support, and from now on this will be tracked in #36.