Enchantment Storage Ideas

Discussion in 'Spigot Plugin Development' started by Hunky524, May 20, 2016.

  1. I don't have a particular problem I don't know how to do, instead I'm wondering how you guys would save enchantments to a config. Enchantments themselves can be saved easily, but saving the enchantment and the enchantment level together is a bit trickier. A couple ideas I had were, saving the enchantment as the key and the level as the value, or saving each enchantment under its own sub-list where the list just contains the enchantment and the level. I am open to all ideas you guys may have :)
     
  2. Get the enchantment and levels
    Store it in config.yml using string
    like: Enchantment-Level
    Next time i just need to .split("-");