Saving Data in Bukkit

Discussion in 'Plugin Development' started by RossCoombs, Nov 26, 2013.

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

    RossCoombs

    Okay, I want to create a sort of "Bank" GUI where you can store money, as if you don't store your money and die then it's going to remove all of your money. Anyway, this needs to be able to save to, I'm guessing, a database? What's the best method in your opinion of doing this? Thanks!
     
  2. Offline

    The_Coder

    Well there are many ways of doing this. There are a few questions that you have to ask yourself:
    Does it have to be fast?
    Does it have to be persistent?
    Does it have to be easy to setup?

    I would store it in a hashmap. Then when the server stops save the data to a yml file.
     
  3. Offline

    RossCoombs

    Hashmap sounds fun, I'll look into that haha.
    I guess it needs to be fast, persistent and pretty easy
     
  4. Offline

    The_Coder

    Well if you need any help pm me.
     
  5. Offline

    DarkBladee12

    RossCoombs Yeah either you use a HashMap or your own class which contains the name of bank account owner and the balance for the non-persistent storage. And for the persistent storage I'd take a flatfile or MySQL.
     
Thread Status:
Not open for further replies.

Share This Page