Best way to save inventories?

Discussion in 'Plugin Development' started by kieranvs, Jan 11, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    kieranvs

    How should one go about saving an inventory that is not associated with a player during a server shutdown/reload? I have tried using javax.persistence, which I use to create databases to save other information, but I couldn't get it to work with the Inventory class. I have seen code in which people have written their own save() and load() methods to save to a text/yaml file, but this seems reasonably long-winded, especially with item metadata. Is there a better way?
     
  2. Offline

    Comphenix

  3. Offline

    kieranvs

    Thanks, this helps a lot! One quick question- does this work perfectly for data such as the contents of written books?
     
  4. Offline

    Comphenix

    Yeah, everything that can be saved to the disk should work with that method.
     
Thread Status:
Not open for further replies.

Share This Page