CryptoMorin / XSeries

Library for cross-version Minecraft Bukkit support and various efficient API methods.
https://www.spigotmc.org/threads/378136/
MIT License
403 stars 126 forks source link

[XItemStack] - Add support for serialization/deserialization of ItemStack directly from a Map #142

Closed SecretX33 closed 3 years ago

SecretX33 commented 3 years ago

Description I would like to add support for serialization and deserialization directly from a Map<String, Object>, since I use XItemStack to handle serialization in a bunch of projects, but I am always capped by the fact that I am forced to use MemoryConfiguration when I need to serialize items, and I can't pass a Map<String, Object> to be serialized back to an ItemStack (for example, a Map read from a config file that is not handled by Bukkit FileConfiguration system).

If you agree, I'll start working on, and eventually push a PR adding support for serialization and deserialization using Maps, and ofc I won't touch the current methods that accept ConfigurationSection.