Saving HashMaps (I know about the SLAPI)

Discussion in 'Plugin Development' started by Baummann, Aug 6, 2011.

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

    Baummann

    I was trying to save a HashMap and load from it, for that I tried to use the SLAPI. But the SLAPI doesn't seem to work for me. Is there a similar way to do that?

    EDIT: I forgot to add throws Exception to the voids and added a try catch clause. That may have caused it to return null. I'll add the throws Exception and see if it works.
     
  2. Offline

    DrBowe

    I'm going to assume that you're aware about Serialization, and how barely any Bukkit objects implement it.

    What does the stacktrace say?
     
  3. You could save the keys and values manually and then push them back in but that'd be quite crude. Post your stacktrace ;)
     
  4. Offline

    coder13

    I did this once, i first got the 'Keyset' and iterated through it saving the the keys and values is it went. worked fine.
     
Thread Status:
Not open for further replies.

Share This Page